Explorar el Código

[智价云] 恢复5分钟清洗任务

tangyuanwang hace 1 día
padre
commit
d4653eb9c2
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2 2
      app/Console/Commands/DailyTask.php

+ 2 - 2
app/Console/Commands/DailyTask.php

@@ -41,8 +41,8 @@ class DailyTask extends Command
 
         try {
             Log::info('每日数据清洗任务执行中 - ' . now());
-            $start_time =  Carbon::yesterday()->startOfDay()->getTimestamp(); // 昨天开始时间 00:00:00
-            $end_time = Carbon::yesterday()->endOfDay()->getTimestamp(); // 昨天结束时间 23:59:59
+            $start_time =  time() - 60 * 5; // 5分钟前开始时间
+            $end_time = time(); // 当前时间
             $CompanyModel = new CompanyModel();
             $company_list = $CompanyModel->select(['id', 'status'])->where('status', 0)->orderByDesc('cleaning_priority')->get()->toarray();
             foreach ($company_list as $company) {