5

I am trying to run a simple job within Laravel queues. The following is my Job.

class SearchFromSource extends Job implements SelfHandling, ShouldQueue
{
    use InteractsWithQueue, SerializesModels;

    public function handle()
    {
        echo time();
    }
}

Here is my code:

$job = (new SearchFromSource($this));
$this->dispatch($job);

The problem is that when I run queue:listen from the command line to run my code I see that the job has been executed twice.

Karl Hill
  • 12,937
  • 5
  • 58
  • 95
Alireza
  • 215
  • 1
  • 3
  • 13

0 Answers0