private readonly AbstractKeyValueStorage
$keyValueStorage ) { parent::
__construct($scheduledTaskRepository);
} public function run(): void
{ try { $this->
handleQueue();
} catch (\Throwable
$e) { // catch exception - otherwise the task will never be called again
$this->elasticsearchHelper->
logAndThrowException($e);
} } private function createAlias(string
$index, string
$alias): void
{ $exist =
$this->client->
indices()->
existsAlias(['name' =>
$alias]);
if (!
$exist) { $this->client->
indices()->
refresh([ 'index' =>
$index,
]);