Skip to content
This repository was archived by the owner on Nov 5, 2025. It is now read-only.
This repository was archived by the owner on Nov 5, 2025. It is now read-only.

How can i run async only once? #46

@pyaehein

Description

@pyaehein

I used async queue. And, I want to run my background function only once. How can i do that ?
Here is my code. Is it right or wrong ? What should i fix ? And how can i know which job failed ?

$job = new myjob($var1, $var2);
$this->dispatch($job);
$job->release();
if ($job->attempts() >= 1)
{
$job->delete();
//will do other process when job fail
}

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