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 1111use Magento \Framework \Exception \LocalizedException ;
1212use Opengento \WebapiLogger \Model \Clean ;
1313
14- class CleanCron
14+ class Cleaner
1515{
1616 public function __construct (private Clean $ clean ) {}
1717
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ password
2020token
2121email</secret_words >
2222 <clean_older_than_hours >24</clean_older_than_hours >
23+ <clean_scheduler >0 * * * *</clean_scheduler >
2324 </log >
2425 </webapi_logs >
2526 </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 66 */
77-->
88<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 >
1212 </job >
1313 </group >
1414</config >
You can’t perform that action at this time.
0 commit comments