Don't run schedules when a server is suspended or installing; closes #4008
This commit is contained in:
parent
ab37ee8633
commit
b07fdc100c
3 changed files with 46 additions and 1 deletions
|
@ -61,6 +61,16 @@ class RunTaskJob extends Job implements ShouldQueue
|
|||
}
|
||||
|
||||
$server = $this->task->server;
|
||||
// If we made it to this point and the server status is not null it means the
|
||||
// server was likely suspended or marked as reinstalling after the schedule
|
||||
// was queued up. Just end the task right now — this should be a very rare
|
||||
// condition.
|
||||
if (!is_null($server->status)) {
|
||||
$this->failed();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
// Perform the provided task against the daemon.
|
||||
try {
|
||||
switch ($this->task->action) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue