Database
in package
implements
Adapter
Database adapter ----- Db adapter for the worker
Table of Contents
Interfaces
- Adapter
- Database adapter ----- Db adapter for the worker
Properties
Methods
- __construct() : mixed
- connect() : mixed
- Connect to queue storage
- getJobs() : array<string|int, mixed>
- Get all jobs for processing
- getNextJob() : object
- Get next job for processing
- markJobAsFailed() : mixed
- Mark job as failed
- popJobFromQueue() : mixed
- Pop job from queue
- pushJobToQueue() : mixed
- Push job to queue
- retryFailedJob() : mixed
- Retry failed job
- setJobStatus() : mixed
- Set job status
- setupAdapterStorage() : mixed
- Setup storage for the adapter
Properties
$config
protected
array<string|int, mixed>
$config
= []
$db
protected
Db
$db
$errors
protected
mixed
$errors
Methods
__construct()
public
__construct() : mixed
connect()
Connect to queue storage
public
connect(mixed $connection) : mixed
Parameters
- $connection : mixed
-
Credentials for the queue storage
Tags
getJobs()
Get all jobs for processing
public
getJobs() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed>getNextJob()
Get next job for processing
public
getNextJob() : object
Tags
Return values
objectmarkJobAsFailed()
Mark job as failed
public
markJobAsFailed(mixed $id) : mixed
Parameters
- $id : mixed
Tags
popJobFromQueue()
Pop job from queue
public
popJobFromQueue(mixed $id) : mixed
Parameters
- $id : mixed
-
The id of the job to pop
Tags
pushJobToQueue()
Push job to queue
public
pushJobToQueue(mixed $job) : mixed
Parameters
- $job : mixed
-
The job to push to the queue
Tags
retryFailedJob()
Retry failed job
public
retryFailedJob(mixed $id, mixed $retryCount) : mixed
Parameters
- $id : mixed
- $retryCount : mixed
Tags
setJobStatus()
Set job status
public
setJobStatus(mixed $id, mixed $status) : mixed
Parameters
- $id : mixed
-
The id of the job to set status
- $status : mixed
-
The status to set
Tags
setupAdapterStorage()
Setup storage for the adapter
protected
setupAdapterStorage() : mixed