Преглед на файлове

[智价云] 日志补充

tangyuanwang преди 20 часа
родител
ревизия
cce00ce872
променени са 1 файла, в които са добавени 6 реда и са изтрити 0 реда
  1. 6 0
      app/Jobs/Manager/Process/ScrapeDataProductJobs.php

+ 6 - 0
app/Jobs/Manager/Process/ScrapeDataProductJobs.php

@@ -93,6 +93,9 @@ class ScrapeDataProductJobs implements ShouldQueue
                     } else if ($page == $last_page) {
                     } else if ($page == $last_page) {
                         Cache::put($key_end_name, '1', 360); //缓存6分钟
                         Cache::put($key_end_name, '1', 360); //缓存6分钟
                         $this->cleanData($company_id, $product_datas);
                         $this->cleanData($company_id, $product_datas);
+                        //写入本地日志
+                        $log_data = ['company_id' => $company_id, 'start_time' => $start_time_string, 'end_time' => $end_time_string, 'data' => $product_datas];
+                        Log::info('scrape_data_product', '数据清洗-读取采集商品数据队列成功', $log_data);
                     }
                     }
                 }
                 }
             } else if (empty($is_end_select) && empty($is_end_select)) {
             } else if (empty($is_end_select) && empty($is_end_select)) {
@@ -123,6 +126,9 @@ class ScrapeDataProductJobs implements ShouldQueue
                     } else if ($page == $last_page) {
                     } else if ($page == $last_page) {
                         Cache::put($key_end_name, '1', 360); //缓存6分钟
                         Cache::put($key_end_name, '1', 360); //缓存6分钟
                         $this->cleanData($company_id, $product_datas);
                         $this->cleanData($company_id, $product_datas);
+                        //写入本地日志
+                        $log_data = ['company_id' => $company_id, 'start_time' => $start_time_string, 'end_time' => $end_time_string, 'data' => $product_datas];
+                        Log::info('scrape_data_product', '数据清洗-读取采集商品数据队列成功', $log_data);
                     }
                     }
                 }
                 }
             }
             }