code: private function registerSyncCompleteEvent(): void
      {
          $this->getEventsManager()
              ->attach(QueueEvent\AfterEnqueue::getName(), function (QueueEvent\AfterEnqueue $event) {
                  if (!$this->client->config->get('sync-enabled')) {
                      return;
                  }
                  $job = $this->popByJid($event->getJid());
                  if (!empty($job)) {
                      $job->perform();
                  }
              });
      }
docs: Immediately handle job if sync mode enabled