NewStatusPipeline.php 904 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <?php
  2. namespace App\Jobs\StatusPipeline;
  3. use App\Status;
  4. use Cache;
  5. use Illuminate\Bus\Queueable;
  6. use Illuminate\Contracts\Queue\ShouldQueue;
  7. use Illuminate\Foundation\Bus\Dispatchable;
  8. use Illuminate\Queue\InteractsWithQueue;
  9. use Illuminate\Queue\SerializesModels;
  10. use Redis;
  11. class NewStatusPipeline implements ShouldQueue
  12. {
  13. use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
  14. protected $status;
  15. /**
  16. * Delete the job if its models no longer exist.
  17. *
  18. * @var bool
  19. */
  20. public $deleteWhenMissingModels = true;
  21. /**
  22. * Create a new job instance.
  23. *
  24. * @return void
  25. */
  26. public function __construct(Status $status)
  27. {
  28. $this->status = $status;
  29. }
  30. /**
  31. * Execute the job.
  32. *
  33. * @return void
  34. */
  35. public function handle()
  36. {
  37. StatusEntityLexer::dispatch($this->status);
  38. }
  39. }