Correctly reset a schedule if there is an exception during the run stage; closes #2550
This commit is contained in:
parent
bffec5b3dc
commit
73b795faba
4 changed files with 71 additions and 15 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue