$batch_size
$batch_size : int
The batch size.
Class ActionScheduler_QueueCleaner
$batch_size : int
The batch size.
$store : \ActionScheduler_Store
ActionScheduler_Store instance.
$month_in_seconds : int
31 days in seconds.
$default_statuses_to_purge : string[]
Default list of statuses purged by the cleaner process.
clean_actions(string[] $statuses_to_purge, \DateTime $cutoff_date, int|null $batch_size = null, string $context = 'old') : array
Delete selected actions limited by status and date.
string[] | $statuses_to_purge | List of action statuses to purge. Defaults to canceled, complete. |
\DateTime | $cutoff_date | Date limit for selecting actions. Defaults to 31 days ago. |
int|null | $batch_size | Maximum number of actions per status to delete. Defaults to 20. |
string | $context | Calling process context. Defaults to |
Actions deleted.
reset_timeouts(int $time_limit = 300) : mixed
Unclaim pending actions that have not been run within a given time limit.
When called by ActionScheduler_Abstract_QueueRunner::run_cleanup(), the time limit passed as a parameter is 10x the time limit used for queue processing.
int | $time_limit | The number of seconds to allow a queue to run before unclaiming its pending actions. Default 300 (5 minutes). |
mark_failures(int $time_limit = 300) : mixed
Mark actions that have been running for more than a given time limit as failed, based on the assumption some uncatchable and unloggable fatal error occurred during processing.
When called by ActionScheduler_Abstract_QueueRunner::run_cleanup(), the time limit passed as a parameter is 10x the time limit used for queue processing.
int | $time_limit | The number of seconds to allow an action to run before it is considered to have failed. Default 300 (5 minutes). |
delete_actions(int[] $actions_to_delete, int $lifespan = null, string $context = 'old') : array
Delete actions.
int[] | $actions_to_delete | List of action IDs to delete. |
int | $lifespan | Minimum scheduled age in seconds of the actions being deleted. |
string | $context | Context of the delete request. |
Deleted action IDs.