作者 lyh

gx添加关键词前后缀

  1 +<?php
  2 +/**
  3 + * @remark :
  4 + * @name :UpdatePageJob.php
  5 + * @author :lyh
  6 + * @method :post
  7 + * @time :2025/2/15 17:41
  8 + */
  9 +
  10 +namespace App\Jobs;
  11 +
  12 +use Illuminate\Bus\Queueable;
  13 +use Illuminate\Contracts\Queue\ShouldQueue;
  14 +use Illuminate\Foundation\Bus\Dispatchable;
  15 +use Illuminate\Queue\InteractsWithQueue;
  16 +use Illuminate\Queue\SerializesModels;
  17 +
  18 +class UpdatePageJob implements ShouldQueue
  19 +{
  20 + use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
  21 + public $tries = 3; // 可配置任务重试次数
  22 +
  23 + protected $param;
  24 +
  25 + /**
  26 + * Create a new job instance.
  27 + *
  28 + * @param CopyImageFile $event
  29 + * @return void
  30 + */
  31 + public function __construct($data)
  32 + {
  33 + $this->param = $data;
  34 + }
  35 +
  36 + /**
  37 + * Execute the job.
  38 + *
  39 + * @return void
  40 + */
  41 + public function handle()
  42 + {
  43 + echo 'sj---:'.json_encode($this->param);
  44 + return true;
  45 + }
  46 +
  47 +}