Adapter
in
Database adapter ----- Db adapter for the worker
Table of Contents
Methods
- 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
Methods
connect()
Connect to queue storage
public
connect(array<string|int, mixed> $connection) : mixed
Parameters
- $connection : array<string|int, mixed>
-
Credentials for the queue storage
getJobs()
Get all jobs for processing
public
getJobs() : array<string|int, mixed>
Return values
array<string|int, mixed>getNextJob()
Get next job for processing
public
getNextJob() : object
Return values
objectmarkJobAsFailed()
Mark job as failed
public
markJobAsFailed(mixed $id) : mixed
Parameters
- $id : mixed
popJobFromQueue()
Pop job from queue
public
popJobFromQueue(string|int $id) : mixed
Parameters
- $id : string|int
-
The id of the job to pop
pushJobToQueue()
Push job to queue
public
pushJobToQueue(array<string|int, mixed> $job) : mixed
Parameters
- $job : array<string|int, mixed>
-
The job to push to the queue
retryFailedJob()
Retry failed job
public
retryFailedJob(mixed $id, mixed $retryCount) : mixed
Parameters
- $id : mixed
- $retryCount : mixed
setJobStatus()
Set job status
public
setJobStatus(string|int $id, string $status) : mixed
Parameters
- $id : string|int
-
The id of the job to set status
- $status : string
-
The status to set