File tree Expand file tree Collapse file tree 4 files changed +23
-4
lines changed Expand file tree Collapse file tree 4 files changed +23
-4
lines changed Original file line number Diff line number Diff line change 11
11
use Magento \Framework \Exception \LocalizedException ;
12
12
use Opengento \WebapiLogger \Model \Clean ;
13
13
14
- class CleanCron
14
+ class Cleaner
15
15
{
16
16
public function __construct (private Clean $ clean ) {}
17
17
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ password
20
20
token
21
21
email</secret_words >
22
22
<clean_older_than_hours >24</clean_older_than_hours >
23
+ <clean_scheduler >0 * * * *</clean_scheduler >
23
24
</log >
24
25
</webapi_logs >
25
26
</default >
Original file line number Diff line number Diff line change
1
+ <?xml version =" 1.0" ?>
2
+ <!--
3
+ /**
4
+ * Copyright © OpenGento, All rights reserved.
5
+ * See LICENSE bundled with this library for license details.
6
+ */
7
+ -->
8
+ <config xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" xsi : noNamespaceSchemaLocation =" urn:magento:module:Magento_Cron:etc/cron_groups.xsd" >
9
+ <group id =" opengento_webapi_logger" >
10
+ <schedule_generate_every >1</schedule_generate_every >
11
+ <schedule_ahead_for >4</schedule_ahead_for >
12
+ <schedule_lifetime >2</schedule_lifetime >
13
+ <history_cleanup_every >10</history_cleanup_every >
14
+ <history_success_lifetime >60</history_success_lifetime >
15
+ <history_failure_lifetime >600</history_failure_lifetime >
16
+ <use_separate_process >1</use_separate_process >
17
+ </group >
18
+ </config >
Original file line number Diff line number Diff line change 6
6
*/
7
7
-->
8
8
<config xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" xsi : noNamespaceSchemaLocation =" urn:magento:module:Magento_Cron:etc/crontab.xsd" >
9
- <group id =" default " >
10
- <job name =" webapilogs_clean " instance =" Opengento\WebapiLogger\Cron\CleanCron " method =" execute" >
11
- <schedule >0 * * * *</ schedule >
9
+ <group id =" opengento_webapi_logger " >
10
+ <job name =" opengento_webapi_logger_cleaner " instance =" Opengento\WebapiLogger\Cron\Cleaner " method =" execute" >
11
+ <config_path >webapi_logs/log/clean_scheduler</ config_path >
12
12
</job >
13
13
</group >
14
14
</config >
You can’t perform that action at this time.
0 commit comments