CameraDownload.php 766 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. namespace Modules\Camera\Jobs;
  3. use Illuminate\Bus\Queueable;
  4. use Illuminate\Queue\SerializesModels;
  5. use Illuminate\Queue\InteractsWithQueue;
  6. use Illuminate\Contracts\Queue\ShouldQueue;
  7. use Illuminate\Foundation\Bus\Dispatchable;
  8. use Illuminate\Support\Facades\Log;
  9. class CameraDownload implements ShouldQueue
  10. {
  11. use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
  12. protected $exceData;
  13. /**
  14. * Create a new job instance.
  15. *
  16. * @return void
  17. */
  18. public function __construct(string $exec)
  19. {
  20. $this->exceData = $exec;
  21. }
  22. /**
  23. * Execute the job.
  24. *
  25. * @return void
  26. */
  27. public function handle()
  28. {
  29. $result = exec($this->exceData);
  30. Log::info($result);
  31. }
  32. }