BackgroundBookingUpgrader_2_2_0 extends BackgroundPausableProcess
in package

Table of Contents

BATCH_SIZE  = 500
$action  : string
$completedTasksOption  : mixed
$paused  : bool
$prefix  : mixed
$tasksCountOption  : mixed
$waitActionsOption  : string
__construct()  : mixed
getCompletedTasksCount()  : int
getIdentifier()  : string
getProgress()  : float
getQueueSize()  : int
getTasksCount()  : int
handle_cron_healthcheck()  : mixed
Restart the background process if not already running and data exists in the queue.
handleWaitAction()  : mixed
isInProgress()  : bool
pause()  : mixed
save()  : mixed
waitAction()  : mixed
after_task_done()  : mixed
afterComplete()  : mixed
complete()  : mixed
get_batch()  : mixed
getWaitingActions()  : array<string|int, mixed>
handle()  : bool
Override parent method for make possible handle without wp_die in the end. Also add $this->paused to handle().
increaseCompletedTasksCount()  : mixed
increaseTasksCount()  : mixed
is_process_running()  : bool
setCompletedTasksCount()  : mixed
setTasksCount()  : mixed
task()  : mixed

Constants

BATCH_SIZE

public mixed BATCH_SIZE = 500

Properties

$action

protected string $action = '2_2_0'

$completedTasksOption

protected mixed $completedTasksOption

$paused

protected bool $paused = false

$prefix

protected mixed $prefix = 'mphb_bg'

$tasksCountOption

protected mixed $tasksCountOption

$waitActionsOption

protected string $waitActionsOption

Methods

__construct()

public __construct() : mixed
Return values
mixed

getCompletedTasksCount()

public getCompletedTasksCount() : int
Return values
int

getIdentifier()

public getIdentifier() : string
Return values
string

getProgress()

public getProgress() : float
Return values
float

The progress value in range [0; 100].

getQueueSize()

public getQueueSize() : int
Return values
int

Only the size of the queue left to proceed (exclude completed batches).

getTasksCount()

public getTasksCount() : int
Return values
int

handle_cron_healthcheck()

Restart the background process if not already running and data exists in the queue.

public handle_cron_healthcheck() : mixed

Override parent method to replace each exit() with return statement.

Return values
mixed

handleWaitAction()

public handleWaitAction() : mixed
Return values
mixed

isInProgress()

public isInProgress() : bool
Return values
bool

pause()

public pause() : mixed
Return values
mixed

save()

public save() : mixed
Return values
mixed

waitAction()

public waitAction(string $action) : mixed
Parameters
$action : string
Return values
mixed

after_task_done()

protected after_task_done() : mixed
Return values
mixed

afterComplete()

protected afterComplete() : mixed
Return values
mixed

complete()

protected complete() : mixed
Return values
mixed

get_batch()

protected get_batch() : mixed
Return values
mixed

getWaitingActions()

protected getWaitingActions() : array<string|int, mixed>
Return values
array<string|int, mixed>

handle()

Override parent method for make possible handle without wp_die in the end. Also add $this->paused to handle().

protected handle() : bool
Return values
bool

increaseCompletedTasksCount()

protected increaseCompletedTasksCount([int $amount = 1 ]) : mixed
Parameters
$amount : int = 1

Optional. 1 by default.

Return values
mixed

increaseTasksCount()

protected increaseTasksCount(int $amount) : mixed
Parameters
$amount : int
Return values
mixed

is_process_running()

protected is_process_running() : bool
Return values
bool

setCompletedTasksCount()

protected setCompletedTasksCount(int $count) : mixed
Parameters
$count : int
Return values
mixed

setTasksCount()

protected setTasksCount(int $count) : mixed
Parameters
$count : int
Return values
mixed

task()

protected task(mixed $roomId) : mixed
Parameters
$roomId : mixed
Return values
mixed

Search results