Queue
in package
Uses
UtilsProvider
Create queue REST service.
Table of Contents
Constants
- LOCK_UNTIL_SECONDS = self::MAX_EXECUTION_SECONDS_PER_REQUEST * self::MAX_BATCH_CLIENT_SIZE
- MAX_BATCH_CLIENT_SIZE = 25
- MAX_EXECUTION_SECONDS_PER_REQUEST = 5
Properties
- $core : mixed
Methods
- __construct() : mixed
- C'tor.
- buildStatus() : mixed
- Create the response array for the `/status` route.
- getPluginConstantPrefix() : string
- Get the prefix of this package so we can utils package natively.
- rest_api_init() : mixed
- Register endpoints.
- routeJobExecute() : mixed
- See API docs.
- routeJobGet() : mixed
- See API docs.
- routeJobResult() : mixed
- See API docs.
- routeJobsDelete() : mixed
- See API docs.
- routeJobsGet() : mixed
- See API docs.
- routeJobsRetry() : mixed
- See API docs.
- routeJobsSkip() : mixed
- See API docs.
- routeStatus() : mixed
- See API docs.
- setupConstants() : mixed
- Make sure the REAL_QUEUE constants are available.
- fetchAdditionalData() : mixed
- Extend the REST API response with requested additional data.
Constants
LOCK_UNTIL_SECONDS
public
mixed
LOCK_UNTIL_SECONDS
= self::MAX_EXECUTION_SECONDS_PER_REQUEST * self::MAX_BATCH_CLIENT_SIZE
MAX_BATCH_CLIENT_SIZE
public
mixed
MAX_BATCH_CLIENT_SIZE
= 25
MAX_EXECUTION_SECONDS_PER_REQUEST
public
mixed
MAX_EXECUTION_SECONDS_PER_REQUEST
= 5
Properties
$core
private
mixed
$core
Methods
__construct()
C'tor.
public
__construct(Core $core) : mixed
Parameters
- $core : Core
Tags
buildStatus()
Create the response array for the `/status` route.
public
buildStatus(array<string|int, mixed> $params) : mixed
Parameters
- $params : array<string|int, mixed>
getPluginConstantPrefix()
Get the prefix of this package so we can utils package natively.
public
getPluginConstantPrefix() : string
Return values
stringrest_api_init()
Register endpoints.
public
rest_api_init() : mixed
routeJobExecute()
See API docs.
public
routeJobExecute(WP_REST_Request $request) : mixed
APIYes
Parameters
- $request : WP_REST_Request
Tags
routeJobGet()
See API docs.
public
routeJobGet(WP_REST_Request $request) : mixed
APIYes
Parameters
- $request : WP_REST_Request
Tags
routeJobResult()
See API docs.
public
routeJobResult(WP_REST_Request $request) : mixed
APIYes
Parameters
- $request : WP_REST_Request
Tags
routeJobsDelete()
See API docs.
public
routeJobsDelete(WP_REST_Request $request) : mixed
APIYes
Parameters
- $request : WP_REST_Request
Tags
routeJobsGet()
See API docs.
public
routeJobsGet(WP_REST_Request $request) : mixed
APIYes
Parameters
- $request : WP_REST_Request
Tags
routeJobsRetry()
See API docs.
public
routeJobsRetry(WP_REST_Request $request) : mixed
APIYes
Parameters
- $request : WP_REST_Request
Tags
routeJobsSkip()
See API docs.
public
routeJobsSkip(WP_REST_Request $request) : mixed
APIYes
Parameters
- $request : WP_REST_Request
Tags
routeStatus()
See API docs.
public
routeStatus(WP_REST_Request $request) : mixed
APIYes
Parameters
- $request : WP_REST_Request
Tags
setupConstants()
Make sure the REAL_QUEUE constants are available.
public
static setupConstants() : mixed
fetchAdditionalData()
Extend the REST API response with requested additional data.
protected
fetchAdditionalData(array<string|int, string> $additionalData) : mixed
Parameters
- $additionalData : array<string|int, string>