Repository navigation
Expand file tree
/
Copy pathapp_queue.php
More file actions
66 lines (48 loc) · 2.23 KB
/
Copy pathapp_queue.php
File metadata and controls
66 lines (48 loc) · 2.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<?php
/**
* This file configures default behavior for all workers
*
* To modify these parameters, copy this file into your own CakePHP config directory or copy the array into your existing file.
*/
return [
'Queue' => [
// time (in seconds) after which a job is requeued if the worker doesn't report back
'defaultworkertimeout' => 1800,
// seconds of running time after which the worker will terminate (0 = unlimited)
'workermaxruntime' => 120,
// minimum time (in seconds) which a task remains in the database before being cleaned up.
'cleanuptimeout' => 2592000, // 30 days
// number of retries if a job fails or times out.
'defaultworkerretries' => 1,
// seconds to sleep() when no executable job is found
'sleeptime' => 10,
// probability in percent of a old job cleanup happening
'gcprob' => 10,
// set to true for multi server setup, this will affect web backend possibilities to kill/end workers
'multiserver' => false,
// set this to a limit that can work with your memory limits and alike, 0 => no limit
'maxworkers' => 3,
// instruct a Workerprocess quit when there are no more tasks for it to execute (true = exit, false = keep running)
'exitwhennothingtodo' => false,
// seconds of running time after which the PHP process will terminate, null uses workermaxruntime * 100
'workertimeout' => null,
// determine whether logging is enabled
'log' => true,
// set default Mailer class
'mailerClass' => 'Cake\Mailer\Email',
// set default datasource connection
'connection' => null,
// enable Search. requires friendsofcake/search
'isSearchEnabled' => true,
// enable Search. requires frontend assets
'isStatisticEnabled' => false,
// Allow workers to wake up from their "nothing to do, sleeping" state when using QueuedJobs->wakeUpWorkers().
// This method sends a SIGUSR1 to workers to interrupt any sleep() operation like it was their time to finish.
// This option breaks tasks expecting sleep() to always sleep for the provided duration without interrupting.
'canInterruptSleep' => false,
// Skip check for createJob() and if task exists
'skipExistenceCheck' => false,
// Additional plugins to include tasks from (if they are not already loaded anyway)
'plugins' => [],
],
];