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();
                }
            });
    }
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();
                }
            });
    }
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 ( ) ; } } ) ; }
Immediately handle job if sync mode enabled
Immediately handle job if sync mode enabled