interface JobRepository

Methods

string
nextJobId()

Get the next job ID that should be assigned.

int
totalRecent()

Get the total count of recent jobs.

int
totalFailed()

Get the total count of failed jobs.

getRecent(int|null $afterIndex = null)

Get a chunk of recent jobs.

getFailed(int|null $afterIndex = null)

Get a chunk of failed jobs.

getPending(int|null $afterIndex = null)

Get a chunk of pending jobs.

getCompleted(int|null $afterIndex = null)

Get a chunk of completed jobs.

getSilenced(int|null $afterIndex = null)

Get a chunk of silenced jobs.

int
countRecent()

Get the count of recent jobs.

int
countFailed()

Get the count of failed jobs.

int
countPending()

Get the count of pending jobs.

int
countCompleted()

Get the count of completed jobs.

int
countSilenced()

Get the count of silenced jobs.

int
countRecentlyFailed()

Get the count of the recently failed jobs.

getJobs(array $ids, mixed $indexFrom = 0)

Retrieve the jobs with the given IDs.

void
pushed(string $connection, string $queue, JobPayload $payload)

Insert the job into storage.

void
reserved(string $connection, string $queue, JobPayload $payload)

Mark the job as reserved.

void
released(string $connection, string $queue, JobPayload $payload, int $delay = 0)

Mark the job as released / pending.

void
remember(string $connection, string $queue, JobPayload $payload)

Mark the job as completed and monitored.

void
migrated(string $connection, string $queue, Collection $payloads)

Mark the given jobs as released / pending.

void
completed(JobPayload $payload, bool $failed = false, bool $silenced = false)

Handle the storage of a completed job.

void
deleteMonitored(array $ids)

Delete the given monitored jobs by IDs.

void
trimRecentJobs()

Trim the recent job list.

void
trimFailedJobs()

Trim the failed job list.

void
trimMonitoredJobs()

Trim the monitored job list.

stdClass|null
findFailed(string $id)

Find a failed job by ID.

void
failed(Throwable $exception, string $connection, string $queue, JobPayload $payload)

Mark the job as failed.

void
storeRetryReference(string $id, string $retryId)

Store the retry job ID on the original job record.

int
deleteFailed(string $id)

Delete a failed job by ID.

Details

at line 17
string nextJobId()

Get the next job ID that should be assigned.

Return Value

string

at line 22
int totalRecent()

Get the total count of recent jobs.

Return Value

int

at line 27
int totalFailed()

Get the total count of failed jobs.

Return Value

int

at line 32
Collection getRecent(int|null $afterIndex = null)

Get a chunk of recent jobs.

Parameters

int|null $afterIndex

Return Value

Collection

at line 37
Collection getFailed(int|null $afterIndex = null)

Get a chunk of failed jobs.

Parameters

int|null $afterIndex

Return Value

Collection

at line 42
Collection getPending(int|null $afterIndex = null)

Get a chunk of pending jobs.

Parameters

int|null $afterIndex

Return Value

Collection

at line 47
Collection getCompleted(int|null $afterIndex = null)

Get a chunk of completed jobs.

Parameters

int|null $afterIndex

Return Value

Collection

at line 52
Collection getSilenced(int|null $afterIndex = null)

Get a chunk of silenced jobs.

Parameters

int|null $afterIndex

Return Value

Collection

at line 57
int countRecent()

Get the count of recent jobs.

Return Value

int

at line 62
int countFailed()

Get the count of failed jobs.

Return Value

int

at line 67
int countPending()

Get the count of pending jobs.

Return Value

int

at line 72
int countCompleted()

Get the count of completed jobs.

Return Value

int

at line 77
int countSilenced()

Get the count of silenced jobs.

Return Value

int

at line 82
int countRecentlyFailed()

Get the count of the recently failed jobs.

Return Value

int

at line 87
Collection getJobs(array $ids, mixed $indexFrom = 0)

Retrieve the jobs with the given IDs.

Parameters

array $ids
mixed $indexFrom

Return Value

Collection

at line 92
void pushed(string $connection, string $queue, JobPayload $payload)

Insert the job into storage.

Parameters

string $connection
string $queue
JobPayload $payload

Return Value

void

at line 97
void reserved(string $connection, string $queue, JobPayload $payload)

Mark the job as reserved.

Parameters

string $connection
string $queue
JobPayload $payload

Return Value

void

at line 102
void released(string $connection, string $queue, JobPayload $payload, int $delay = 0)

Mark the job as released / pending.

Parameters

string $connection
string $queue
JobPayload $payload
int $delay

Return Value

void

at line 107
void remember(string $connection, string $queue, JobPayload $payload)

Mark the job as completed and monitored.

Parameters

string $connection
string $queue
JobPayload $payload

Return Value

void

at line 112
void migrated(string $connection, string $queue, Collection $payloads)

Mark the given jobs as released / pending.

Parameters

string $connection
string $queue
Collection $payloads

Return Value

void

at line 117
void completed(JobPayload $payload, bool $failed = false, bool $silenced = false)

Handle the storage of a completed job.

Parameters

JobPayload $payload
bool $failed
bool $silenced

Return Value

void

at line 122
void deleteMonitored(array $ids)

Delete the given monitored jobs by IDs.

Parameters

array $ids

Return Value

void

at line 127
void trimRecentJobs()

Trim the recent job list.

Return Value

void

at line 132
void trimFailedJobs()

Trim the failed job list.

Return Value

void

at line 137
void trimMonitoredJobs()

Trim the monitored job list.

Return Value

void

at line 142
stdClass|null findFailed(string $id)

Find a failed job by ID.

Parameters

string $id

Return Value

stdClass|null

at line 147
void failed(Throwable $exception, string $connection, string $queue, JobPayload $payload)

Mark the job as failed.

Parameters

Throwable $exception
string $connection
string $queue
JobPayload $payload

Return Value

void

at line 152
void storeRetryReference(string $id, string $retryId)

Store the retry job ID on the original job record.

Parameters

string $id
string $retryId

Return Value

void

at line 157
int deleteFailed(string $id)

Delete a failed job by ID.

Parameters

string $id

Return Value

int