Procházet zdrojové kódy

[智价云] 队列更新

tangyuanwang před 18 hodinami
rodič
revize
058b066231

+ 1 - 1
app/Console/Commands/CityWarningNotice.php

@@ -33,7 +33,7 @@ class CityWarningNotice extends Command
         $this->info('开始执行每日采集预警通知任务...' . now());
         try {
             Log::info('每日采集预警通知任务执行中 - ' . now());
-            CityWarningNoticeJobs::dispatchSync([]);
+            CityWarningNoticeJobs::dispatchSync();
             $this->info('每日采集预警通知执行完成!' . now());
             return Command::SUCCESS;
         } catch (\Exception $e) {

+ 2 - 13
app/Jobs/Manager/Process/CityWarningNoticeJobs.php

@@ -29,17 +29,6 @@ class CityWarningNoticeJobs implements ShouldQueue
     public $tries = 3; // 限制重试次数
     public $timeout = 600; // 10分钟超时
 
-    protected $message_data;
-    /**
-     * Create a new job instance.
-     *
-     * @return void
-     */
-    public function __construct(array $message_data)
-    {
-        $this->message_data = $message_data;
-    }
-
     /**
      * Execute the job.
      *
@@ -101,12 +90,12 @@ class CityWarningNoticeJobs implements ShouldQueue
                 }
             }
         } catch (\Exception $e) {
-            Log::info('job_error', '数据清洗-城市为空预警通知队列失败', ['data' => $this->message_data, 'error' => $e->getMessage()]);
+            Log::info('job_error', '数据清洗-城市为空预警通知队列失败', ['error' => $e->getMessage()]);
         }
     }
 
     public function failed(\Throwable $exception)
     {
-        Log::info('job_error', '数据清洗-城市为空预警通知队列完全失败', ['data' => $this->message_data, 'error' => $exception->getMessage()]);
+        Log::info('job_error', '数据清洗-城市为空预警通知队列完全失败', ['error' => $exception->getMessage()]);
     }
 }