InboxWorker.php 933 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?php
  2. namespace App\Jobs\InboxPipeline;
  3. use App\Profile;
  4. use App\Util\ActivityPub\Inbox;
  5. use Illuminate\Bus\Queueable;
  6. use Illuminate\Queue\SerializesModels;
  7. use Illuminate\Queue\InteractsWithQueue;
  8. use Illuminate\Contracts\Queue\ShouldQueue;
  9. use Illuminate\Foundation\Bus\Dispatchable;
  10. class InboxWorker implements ShouldQueue
  11. {
  12. use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
  13. protected $request;
  14. protected $profile;
  15. protected $payload;
  16. /**
  17. * Create a new job instance.
  18. *
  19. * @return void
  20. */
  21. public function __construct($request, Profile $profile, $payload)
  22. {
  23. $this->request = $request;
  24. $this->profile = $profile;
  25. $this->payload = $payload;
  26. }
  27. /**
  28. * Execute the job.
  29. *
  30. * @return void
  31. */
  32. public function handle()
  33. {
  34. (new Inbox($this->request, $this->profile, $this->payload))->handle();
  35. }
  36. }