Skip to content
This repository has been archived by the owner on Apr 13, 2022. It is now read-only.

Commit

Permalink
Update SegmentServiceProvider.php
Browse files Browse the repository at this point in the history
  • Loading branch information
GrahamCampbell authored Dec 28, 2019
1 parent 94c3159 commit b6ea062
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/SegmentServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,11 @@ protected function setupConfig()
*/
protected function setupQueue()
{
$this->app->queue->looping(function () {
Segment::flush();
});
if ($this->app->runningInConsole()) {
$this->app->queue->looping(function () {
Segment::flush();
});
}
}

/**
Expand Down

0 comments on commit b6ea062

Please sign in to comment.