public function subscribeQueueEvents(QueueManager $queue)
    {
        $queue->looping(function () {
            // Flush any and all events that were possibly generated by queue jobs
            Integration::flushEvents();

            // We have added a scope when a job starts processing
            Hub::getCurrent()->popScope();
        });

        foreach (static::$queueEventHandlerMap as $eventName => $handler) {
            $this->events->listen($eventName, [$this, $handler]);
        }
    }
public function subscribeQueueEvents(QueueManager $queue)
    {
        $queue->looping(function () {
            // Flush any and all events that were possibly generated by queue jobs
            Integration::flushEvents();

            // We have added a scope when a job starts processing
            Hub::getCurrent()->popScope();
        });

        foreach (static::$queueEventHandlerMap as $eventName => $handler) {
            $this->events->listen($eventName, [$this, $handler]);
        }
    }
public function subscribeQueueEvents ( QueueManager $ queue ) { $ queue -> looping ( function ( ) { // Flush any and all events that were possibly generated by queue jobs Integration :: flushEvents ( ) ; // We have added a scope when a job starts processing Hub :: getCurrent ( ) -> popScope ( ) ; } ) ; foreach ( static :: $ queueEventHandlerMap as $ eventName => $ handler ) { $ this -> events -> listen ( $ eventName , [ $ this , $ handler ] ) ; } }
Attach all queue event handlers.

@param \Illuminate\Queue\QueueManager $queue
Attach all queue event handlers .