Jan Jakes
c67c58709b
Unify spacing of declare statements
...
[MAILPOET-2688]
2022-11-29 15:04:09 +01:00
Rostislav Wolny
4d7f6f8c75
Use more effective method deactivation
...
This will cancel all jobs with one query. Instead of cancelling one by one.
In case that some action gets scheduled multiple times e.g. due a race condition
it will remove all jobs.
2022-10-13 14:21:43 +02:00
Rostislav Wolny
c44758b90d
Refactor action scheduler deactivation into DaemonActionSchedulerRunner::init
...
[MAILPOET-4274]
2022-08-03 10:36:57 +02:00
Rostislav Wolny
16807fe9e3
Update and fix comments related to usage of Action Scheduler in cron
...
[MAILPOET-4274]
2022-08-03 10:36:57 +02:00
Rostislav Wolny
977f9beb87
Refactor deactivation of MailPoet cron actions to run only once
...
[MAILPOET-4274]
2022-08-03 10:36:57 +02:00
Rostislav Wolny
d3e2bcdf34
Refactor daemon trigger and daemon run actions to extra classes
...
[MAILPOET-4274]
2022-08-03 10:36:57 +02:00
Rostislav Wolny
476ee1ede9
Refactor triggering new action scheduler executor into extra service
...
[MAILPOET-4274]
2022-08-03 10:36:57 +02:00
Rostislav Wolny
bb1d461c54
Fix code formatting issues in ActionSchedulerRunner class
...
[MAILPOET-4274]
2022-08-03 10:36:57 +02:00
Rostislav Wolny
dfae17ed94
Add missing return and parameter types to action scheduler related classes
...
[MAILPOET-4274]
2022-08-03 10:36:57 +02:00
Rostislav Wolny
2ba1696d53
Add adaptive execution limit when daemon runs inside Action Scheduler
...
We use action_scheduler_maximum_execution_time_likely_to_be_exceeded filter for reading remaining execution limit
tracked in the Action Scheduler runner.
Then we use the remaining limit minus safety margin for the daemon execution.
[MAILPOET-4274]
2022-08-03 10:36:57 +02:00
Rostislav Wolny
91e72ee646
Lower execution limit of daemon in case it runs in action scheduler
...
[MAILPOET-4274]
2022-08-03 10:36:57 +02:00
Rostislav Wolny
b525f9f876
Deactivate action scheduler actions when another method is active
...
[MAILPOET-4274]
2022-08-03 10:36:57 +02:00
Rostislav Wolny
86562e99b9
Trigger additional executor only when MailPoet daemon runs
...
In afterProcess callback we trigger a new runner when there are still some scheduled tasks
to process. Before this change we did this for every action scheduler run and it was causing that
we triggered more HTTP requests than needed.
[MAILPOET-4274]
2022-08-03 10:36:57 +02:00
Rostislav Wolny
f59945d483
Add wrapper class for action scheduler in cron
...
The class add GROUP ID so that all MailPoet cron tasks are stored under the same group.
[MAILPOET-4274]
2022-08-03 10:36:57 +02:00
Rostislav Wolny
ccfdd229ec
Add action scheduler daemon runner
...
This commit adds a class that handles continuous processing of MailPoet cron daemon
using Action Scheduler's recurring actions.
[MAILPOET-4274]
2022-08-03 10:36:57 +02:00