Skip to content

Commit 8424ac9

Browse files
Preserve repaired timer task schedules
1 parent 0907ee7 commit 8424ac9

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/V2/Support/TaskRepair.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -191,9 +191,7 @@ private static function createMissingTask(WorkflowRun $run, WorkflowRunSummary $
191191
'workflow_run_id' => $run->id,
192192
'task_type' => TaskType::Timer->value,
193193
'status' => TaskStatus::Ready->value,
194-
'available_at' => $timer->fire_at !== null && $timer->fire_at->isFuture()
195-
? $timer->fire_at
196-
: now(),
194+
'available_at' => $timer->fire_at ?? now(),
197195
'payload' => [
198196
'timer_id' => $timer->id,
199197
],

tests/Feature/V2/V2WorkflowTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6144,6 +6144,8 @@ public function testTaskWatchdogRecreatesMissingTimerTaskFromTypedHistoryWhenTim
61446144
$this->assertSame($timerId, $summary->resume_source_id);
61456145
$this->assertNull($summary->next_task_id);
61466146

6147+
Carbon::setTestNow(Carbon::parse('2026-04-09 18:01:00'));
6148+
61476149
$this->wakeTaskWatchdog();
61486150

61496151
/** @var WorkflowTimer $restoredTimer */

0 commit comments

Comments
 (0)