ActionScheduler_QueueCleaner
in package
Class ActionScheduler_QueueCleaner
Table of Contents
- $batch_size : int
- $month_in_seconds : int
- 31 days in seconds.
- $store : ActionScheduler_Store
- __construct() : mixed
- ActionScheduler_QueueCleaner constructor.
- clean() : mixed
- Do all of the cleaning actions.
- delete_old_actions() : mixed
- mark_failures() : mixed
- Mark actions that have been running for more than a given time limit as failed, based on the assumption some uncatachable and unloggable fatal error occurred during processing.
- reset_timeouts() : mixed
- Unclaim pending actions that have not been run within a given time limit.
- get_batch_size() : int
- Get the batch size for cleaning the queue.
Properties
$batch_size
protected
int
$batch_size
$month_in_seconds
31 days in seconds.
private
int
$month_in_seconds
= 2678400
$store
private
ActionScheduler_Store
$store
=
ull
Methods
__construct()
ActionScheduler_QueueCleaner constructor.
public
__construct([ActionScheduler_Store $store = null ][, int $batch_size = 20 ]) : mixed
Parameters
- $store : ActionScheduler_Store = null
-
The store instance.
- $batch_size : int = 20
-
The batch size.
Return values
mixed —clean()
Do all of the cleaning actions.
public
clean([int $time_limit = 300 ]) : mixed
Parameters
- $time_limit : int = 300
-
The number of seconds to use as the timeout and failure period. Default 300 (5 minutes).
Tags
Return values
mixed —delete_old_actions()
public
delete_old_actions() : mixed
Return values
mixed —mark_failures()
Mark actions that have been running for more than a given time limit as failed, based on the assumption some uncatachable and unloggable fatal error occurred during processing.
public
mark_failures([int $time_limit = 300 ]) : mixed
When called by ActionScheduler_Abstract_QueueRunner::run_cleanup(), the time limit passed as a parameter is 10x the time limit used for queue processing.
Parameters
- $time_limit : int = 300
-
The number of seconds to allow an action to run before it is considered to have failed. Default 300 (5 minutes).
Return values
mixed —reset_timeouts()
Unclaim pending actions that have not been run within a given time limit.
public
reset_timeouts([int $time_limit = 300 ]) : mixed
When called by ActionScheduler_Abstract_QueueRunner::run_cleanup(), the time limit passed as a parameter is 10x the time limit used for queue processing.
Parameters
- $time_limit : int = 300
-
The number of seconds to allow a queue to run before unclaiming its pending actions. Default 300 (5 minutes).
Return values
mixed —get_batch_size()
Get the batch size for cleaning the queue.
protected
get_batch_size() : int