Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use \Closure instead of callable - fix #401 #403

Merged
merged 1 commit into from
Jul 20, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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();
});
}
}