HandlePastBill.php 926 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. namespace App\Jobs;
  3. use App\Services\OwnerPriceOperationService;
  4. use Illuminate\Bus\Queueable;
  5. use Illuminate\Contracts\Queue\ShouldQueue;
  6. use Illuminate\Foundation\Bus\Dispatchable;
  7. use Illuminate\Queue\InteractsWithQueue;
  8. class HandlePastBill implements ShouldQueue
  9. {
  10. use Dispatchable, InteractsWithQueue, Queueable;
  11. protected $arr;
  12. /**
  13. * Create a new job instance.
  14. *
  15. * @param array $arr
  16. *
  17. * @return void
  18. */
  19. public function __construct(array $arr)
  20. {
  21. $this->arr = $arr;
  22. }
  23. /**
  24. * Execute the job.
  25. *
  26. * @param OwnerPriceOperationService $service
  27. *
  28. * @return void
  29. */
  30. public function handle(OwnerPriceOperationService $service)
  31. {
  32. ini_set('max_execution_time', 2500);
  33. list($rule,$owner,$discountIndex,$pivot) = $this->arr;
  34. $service->handlePastBill($rule,$owner,$discountIndex,$pivot);
  35. }
  36. }