Skip to content

Commit

Permalink
Merge pull request #403 from rodrigopedra/main
Browse files Browse the repository at this point in the history
Use \Closure instead of callable - fix #401
  • Loading branch information
AlexVanderbist authored Jul 20, 2021
2 parents 9811711 + f5c4111 commit 92f83c9
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions src/IgnitionServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -492,20 +492,30 @@ protected function setupQueue(QueueManager $queue)
{
// Reset before executing a queue job to make sure the job's log/query/dump recorders are empty.
// When using a sync queue this also reports the queued reports from previous exceptions.
$queue->before([$this, 'resetFlare']);
$queue->before(function () {
$this->resetFlare();
});

// Send queued reports (and reset) after executing a queue job.
$queue->after([$this, 'resetFlare']);
$queue->after(function () {
$this->resetFlare();
});

// Note: the $queue->looping() event can't be used because it's not triggered on Vapor
}

protected function setupOctane()
{
$this->app['events']->listen(RequestReceived::class, [$this, 'resetFlare']);
$this->app['events']->listen(RequestReceived::class, function () {
$this->resetFlare();
});

$this->app['events']->listen(TaskReceived::class, [$this, 'resetFlare']);
$this->app['events']->listen(TaskReceived::class, function () {
$this->resetFlare();
});

$this->app['events']->listen(TickReceived::class, [$this, 'resetFlare']);
$this->app['events']->listen(TickReceived::class, function () {
$this->resetFlare();
});
}
}

0 comments on commit 92f83c9

Please sign in to comment.