SharedInboxWorker.php 919 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?php
  2. namespace App\Jobs\InboxPipeline;
  3. use App\Util\ActivityPub\Inbox;
  4. use Illuminate\Bus\Queueable;
  5. use Illuminate\Contracts\Queue\ShouldQueue;
  6. use Illuminate\Foundation\Bus\Dispatchable;
  7. use Illuminate\Queue\InteractsWithQueue;
  8. use Illuminate\Queue\SerializesModels;
  9. class SharedInboxWorker implements ShouldQueue
  10. {
  11. use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
  12. protected $request;
  13. protected $profile;
  14. protected $payload;
  15. public $timeout = 60;
  16. public $tries = 1;
  17. /**
  18. * Create a new job instance.
  19. *
  20. * @return void
  21. */
  22. public function __construct($request, $payload)
  23. {
  24. $this->request = $request;
  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, null, $this->payload))->handleSharedInbox();
  35. }
  36. }