Skip to content

Commit cd50827

Browse files
committed
changed defaults, updated docs and changelog
1 parent d57f67d commit cd50827

File tree

3 files changed

+36
-35
lines changed

3 files changed

+36
-35
lines changed

CHANGELOG.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,26 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [2.1.0] - 2024-12-10
9+
* added commands to purge queues and test queues
10+
* fixed test queue template path
11+
* changed `queue_monitor purge` to `queue-monitor purge-logs`
12+
* changed `queue_monitor notify` to `queue-monitor notify
13+
* changed default configuration of `purgeLogsOlderThanDays` to 7 days instead of 30
14+
15+
## [2.0.2] - 2024-12-09
16+
* ported fixes and enhancement from version 1.x
17+
* fixed handling `QueueMonitor.purgeLogsOlderThanDays` in Purge command
18+
* added `QueueMonitor.disabled` option
19+
* added support for disabling queue monitor commands
20+
* updated README.md
21+
* decreased log level when queue monitor is disabled
22+
* replaced saveOrFail with save
23+
24+
## [2.0.1] - 2024-05-14
25+
### Fixed
26+
- Removed TimestampBehavior from LogsTable to avoid problems when TimestampBehavior is overriden
27+
828
## [2.0] - 2024-04-17
929

1030
### Added

README.md

Lines changed: 15 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
## Versions and branches
44
| CakePHP | CakeDC Queue Monitor Plugin | Tag | Notes |
55
|:-------:|:--------------------------------------------------------------------------:|:------------:|:-------|
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 |
77
| ^4.4 | [1.0.0](https://github.com/CakeDC/cakephp-queue-monitor/tree/1.next-cake4) | 1.next-cake4 | stable |
88

99
## Overview
@@ -26,28 +26,14 @@ composer require cakedc/queue-monitor
2626
```
2727

2828
## 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
4936
```
50-
5137
Set up the QueueMonitor configuration in your `config/app_local.php`:
5238
```php
5339
// ...
@@ -58,28 +44,22 @@ Set up the QueueMonitor configuration in your `config/app_local.php`:
5844

5945
// mailer config, the default is `default` mailer, you can ommit
6046
// this setting if you use default value
61-
'mailerConfig' => 'myCustomMailer',
47+
'mailerConfig' => 'default',
6248

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,
6651

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
6853
// its advised to set this value correctly after queue usage analysis to avoid
6954
// high space usage in db
70-
'purgeLogsOlderThanDays' => 10,
55+
'purgeLogsOlderThanDays' => 7,
7156

7257
// comma separated list of recipients of notification about long running queue jobs
7358
7459
],
7560
// ...
7661
```
7762

78-
Run the required migrations
79-
```shell
80-
bin/cake migrations migrate -p CakeDC/QueueMonitor
81-
```
82-
8363
For each queue configuration add `listener` setting
8464
```php
8565
// ...
@@ -95,7 +75,8 @@ For each queue configuration add `listener` setting
9575

9676
## Notification command
9777

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:
9980
```shell
10081
bin/cake queue-monitor notify
10182
```

src/Command/PurgeLogsCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ final class PurgeLogsCommand extends Command
3232
use DisableTrait;
3333
use LogTrait;
3434

35-
private const DEFAULT_PURGE_DAYS_OLD = 30;
35+
private const DEFAULT_PURGE_DAYS_OLD = 7;
3636

3737
/**
3838
* Constructor

0 commit comments

Comments
 (0)