added schedule helper
This commit is contained in:
parent
a7b132372c
commit
31b1b80935
|
|
@ -179,6 +179,19 @@ if (! function_exists('running_in_queue')) {
|
|||
}
|
||||
}
|
||||
|
||||
if (! function_exists('running_in_schedule')) {
|
||||
/**
|
||||
* Detect if application is running in schedule.
|
||||
*/
|
||||
function running_in_schedule(): bool
|
||||
{
|
||||
return app()->runningConsoleCommand([
|
||||
'schedule:run',
|
||||
'schedule:work',
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
if (! function_exists('running_in_test')) {
|
||||
/**
|
||||
* Detect if application is running in test.
|
||||
|
|
|
|||
Loading…
Reference in New Issue