File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -130,16 +130,16 @@ You can set two main things on each task as property: timeout and retries.
130130 /**
131131 * Timeout for this task in seconds, after which the task is reassigned to a new worker.
132132 *
133- * @var int
133+ * @var ? int
134134 */
135- public $timeout = 120;
135+ public ?int $timeout = 120;
136136
137137 /**
138138 * Number of times a failed instance of this task should be restarted before giving up.
139139 *
140- * @var int
140+ * @var ? int
141141 */
142- public $retries = 1;
142+ public ?int $retries = 1;
143143```
144144Make sure you set the timeout high enough so that it could never run longer than this, otherwise you risk it being re-run while still being run.
145145It is recommended setting it to at least 2x the maximum possible execution length. See [ Concurrent workers] ( limitations.md )
You can’t perform that action at this time.
0 commit comments