Skip to content
This repository was archived by the owner on Mar 9, 2024. It is now read-only.
This repository was archived by the owner on Mar 9, 2024. It is now read-only.

Alternative to the later method #92

Open
@gsoareslima

Description

@gsoareslima

Hello, an alternative to work as expected the later method:

On class: \Barryvdh\Queue\AsyncQueue

public function getJobFromId($id, bool $waitUntilAvaible = true)
{
$job = $this->database->table($this->table)
->where('id', $id)
->first();
if ($waitUntilAvaible && $job->available_at > $this->currentTime()) sleep($job->available_at - $this->currentTime());
if ($job) {
$job = $this->markJobAsReserved(new DatabaseJobRecord((object) $job));
return new DatabaseJob(
$this->container, $this, $job, $this->connectionName, $job->queue
);
}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions