ProcessQuestionJob.php 649 B

123456789101112131415161718192021222324252627
  1. <?php
  2. namespace App\Jobs;
  3. use App\Services\QuestionReviewService;
  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 ProcessQuestionJob implements ShouldQueue
  10. {
  11. use Dispatchable;
  12. use InteractsWithQueue;
  13. use Queueable;
  14. use SerializesModels;
  15. public function __construct(public readonly int $candidateId)
  16. {
  17. }
  18. public function handle(QuestionReviewService $reviewService): void
  19. {
  20. $reviewService->promoteCandidateToQuestion($this->candidateId);
  21. }
  22. }