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
Copy file name to clipboardExpand all lines: docs/README.md
+5-5
Original file line number
Diff line number
Diff line change
@@ -209,7 +209,7 @@ It will use your custom APP `QueueEmailTask` to send out emails via CLI.
209
209
210
210
Important: Do not forget to set your [domain](https://book.cakephp.org/3.0/en/core-libraries/email.html#sending-emails-from-cli) when sending from CLI.
211
211
212
-
### Avoid re-queuing
212
+
### Avoiding parallel (re)queueing
213
213
214
214
For some background-tasks you will want to make sure only a single instance of this type is currently run.
215
215
In your logic you can check on this using `isQueued()` and a unique reference:
@@ -229,10 +229,8 @@ In your logic you can check on this using `isQueued()` and a unique reference:
229
229
}
230
230
231
231
$this->QueuedJobs->createJob(
232
-
'Execute',
233
-
[
234
-
'command' => 'bin/cake importer run',
235
-
],
232
+
'Execute',
233
+
['command' => 'bin/cake importer run'],
236
234
['reference' => 'my-import', 'priority' => 2]
237
235
);
238
236
@@ -246,6 +244,8 @@ So if someone clicks on the button again before the job is finished, he will not
0 commit comments