You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To learn more about the [Queue package](https://github.com/codeigniter4/queue) you can visit a project page.
95
+
96
+
97
+
The `singleInstance()` option, described in the next section, works a bit differently than with other scheduling methods.
98
+
Since queue jobs are added quickly and processed later in the background, the lock is applied as soon as the job is queued - not when it actually runs.
- The lock is set immediately when the job is queued.
122
+
- The job must start processing before the TTL expires (in this case, within 30 minutes).
123
+
- Once the job starts, the lock is renewed for the same TTL.
124
+
- So, effectively, you have 30 minutes to start, and another 30 minutes to complete the job.
125
+
84
126
## Single Instance Tasks
85
127
86
128
Some tasks can run longer than their scheduled interval. To prevent multiple instances of the same task running simultaneously, you can use the `singleInstance()` method:
Copy file name to clipboardExpand all lines: phpstan-baseline.neon
+1-1
Original file line number
Diff line number
Diff line change
@@ -39,7 +39,7 @@ parameters:
39
39
-
40
40
message:'#^Call to method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''CodeIgniter\\\\Tasks\\\\Task'' and CodeIgniter\\Tasks\\Task will always evaluate to true\.$#'
0 commit comments