handleQueue example

private readonly ElasticsearchHelper $elasticsearchHelper,
        private readonly array $config,
        private readonly EventDispatcherInterface $eventDispatcher,
        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) {
            
Home | Imprint | This part of the site doesn't use cookies.