3
3
## Versions and branches
4
4
| CakePHP | CakeDC Queue Monitor Plugin | Tag | Notes |
5
5
| :-------:| :--------------------------------------------------------------------------:| :------------:| :-------|
6
- | ^5.0 | [ 2.0 .0] ( https://github.com/CakeDC/cakephp-queue-monitor/tree/2.next-cake5 ) | 2.next-cake5 | stable |
6
+ | ^5.0 | [ 2.1 .0] ( https://github.com/CakeDC/cakephp-queue-monitor/tree/2.next-cake5 ) | 2.next-cake5 | stable |
7
7
| ^4.4 | [ 1.0.0] ( https://github.com/CakeDC/cakephp-queue-monitor/tree/1.next-cake4 ) | 1.next-cake4 | stable |
8
8
9
9
## Overview
@@ -26,28 +26,14 @@ composer require cakedc/queue-monitor
26
26
```
27
27
28
28
## Configuration
29
-
30
- Add QueueMonitorPlugin to your ` Application::bootstrap ` :
31
- ``` php
32
- use Cake\Http\BaseApplication;
33
- use CakeDC\QueueMonitor\QueueMonitorPlugin;
34
-
35
- class Application extends BaseApplication
36
- {
37
- // ...
38
-
39
- public function bootstrap(): void
40
- {
41
- parent::bootstrap();
42
-
43
- $this->addPlugin(QueueMonitorPlugin::class);
44
- }
45
-
46
- // ...
47
- }
48
-
29
+ Add QueueMonitorPlugin to your application by running command:
30
+ ``` shell
31
+ bin/cake plugin load CakeDC/QueueMonitor
32
+ ```
33
+ Run the required migrations
34
+ ``` shell
35
+ bin/cake migrations migrate -p CakeDC/QueueMonitor
49
36
```
50
-
51
37
Set up the QueueMonitor configuration in your ` config/app_local.php ` :
52
38
``` php
53
39
// ...
@@ -58,28 +44,22 @@ Set up the QueueMonitor configuration in your `config/app_local.php`:
58
44
59
45
// mailer config, the default is `default` mailer, you can ommit
60
46
// this setting if you use default value
61
- 'mailerConfig' => 'myCustomMailer ',
47
+ 'mailerConfig' => 'default ',
62
48
63
- // the default is 30 minutes, you can ommit this setting if you
64
- // use the default value
65
- 'longJobInMinutes' => 45,
49
+ // the default is 30 minutes, you can ommit this setting if you use the default value
50
+ 'longJobInMinutes' => 30,
66
51
67
- // the default is 30 days, you can ommit this setting if you
52
+ // the default is 7 days, you can ommit this setting if you use the default value
68
53
// its advised to set this value correctly after queue usage analysis to avoid
69
54
// high space usage in db
70
- 'purgeLogsOlderThanDays' => 10 ,
55
+ 'purgeLogsOlderThanDays' => 7 ,
71
56
72
57
// comma separated list of recipients of notification about long running queue jobs
73
58
74
59
],
75
60
// ...
76
61
```
77
62
78
- Run the required migrations
79
- ``` shell
80
- bin/cake migrations migrate -p CakeDC/QueueMonitor
81
- ```
82
-
83
63
For each queue configuration add ` listener ` setting
84
64
``` php
85
65
// ...
@@ -95,7 +75,8 @@ For each queue configuration add `listener` setting
95
75
96
76
## Notification command
97
77
98
- To set up notifications when there are long running or possible stuck jobs please use command
78
+ To set up notifications when there are jobs running for a long time or jobs that may be stuck and blocking the queue
79
+ please use command:
99
80
``` shell
100
81
bin/cake queue-monitor notify
101
82
```
0 commit comments