Correctly reset a schedule if there is an exception during the run stage; closes #2550

This commit is contained in:
Dane Everitt
2020-10-26 20:54:15 -07:00
parent bffec5b3dc
commit 73b795faba
4 changed files with 71 additions and 15 deletions

View File

@@ -44,7 +44,8 @@ class ExecuteScheduleTest extends ClientApiIntegrationTestCase
$this->actingAs($user)->postJson($this->link($schedule, '/execute'))->assertStatus(Response::HTTP_ACCEPTED);
Bus::assertDispatched(function (RunTaskJob $job) use ($task) {
$this->assertSame($task->time_offset, $job->delay);
// A task executed right now should not have any job delay associated with it.
$this->assertNull($job->delay);
$this->assertSame($task->id, $job->task->id);
return true;