Skip to content

Commit 1446617

Browse files
authored
Change timeout to string format in execute method
Updated timeout parameter in execute method to accept a string format for time duration.
1 parent 5a54979 commit 1446617

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

docs/features/signal+timer.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@ class MyWorkflow extends Workflow
2323

2424
public function execute()
2525
{
26-
// Wait for 5 minutes or $ready = true, whichever comes first
27-
$result = yield awaitWithTimeout(300, fn () => $this->ready);
26+
$result = yield awaitWithTimeout('5 minutes', fn () => $this->ready);
2827
}
2928
}
3029
```
@@ -36,5 +35,3 @@ $workflow->setReady();
3635
```
3736

3837
Or, if the specified timeout is reached, the workflow will continue without the signal. The return value is `true` if the signal was received before the timeout, or `false` if the timeout was reached without receiving the signal.
39-
40-
You may also specify the time to wait as a string e.g. '30 seconds', '5 minutes' or '2 weeks'.

0 commit comments

Comments
 (0)