SendTemplate.php 1002 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <?php
  2. namespace App\Jobs;
  3. use Illuminate\Contracts\Queue\ShouldQueue;
  4. use Illuminate\Queue\InteractsWithQueue;
  5. use Illuminate\Queue\SerializesModels;
  6. class SendTemplate extends Job implements ShouldQueue
  7. {
  8. use InteractsWithQueue, SerializesModels;
  9. private $data;
  10. /**
  11. * Create a new job instance.
  12. *
  13. * @return void
  14. */
  15. public function __construct($data)
  16. {
  17. //
  18. $data['send_time']=date("Y-m-d H:i:s");
  19. $this->data = $data;
  20. }
  21. /**
  22. * Execute the job.
  23. *
  24. * @return void
  25. */
  26. public function handle()
  27. {
  28. //
  29. // $this->data['receive_time'] = date("Y-m-d H:i:s");
  30. // echo json_encode($this->data);
  31. // try{
  32. // $TemplateWork = new TemplateWorksController($this->data['data']);
  33. // $TemplateWork->do_work();
  34. // }
  35. // // 加上\ 全局抓取
  36. // catch(\Exception $e){
  37. // //v('handle_ept: info:'.$e->getMessage());
  38. // }
  39. }
  40. }