作者 lyh

gx

@@ -40,18 +40,16 @@ class UpdateProgress extends Command @@ -40,18 +40,16 @@ class UpdateProgress extends Command
40 */ 40 */
41 public function handle() 41 public function handle()
42 { 42 {
43 -// $project_id = Redis::rpop('updateProgress');  
44 -// while ($project_id){  
45 -// echo date('Y-m-d H:i:s') . ' start: ' . $project_id . PHP_EOL;  
46 -// try {  
47 -// ProjectServer::useProject($project_id);  
48 -// $this->getUpdateProgress($project_id);  
49 -// DB::disconnect('custom_mysql');  
50 -// }catch (\Exception $e){  
51 -// echo date('Y-m-d H:i:s') . ' error: ' . $project_id . '->' . $e->getMessage() . PHP_EOL;  
52 -// }  
53 -// echo date('Y-m-d H:i:s') . ' end: ' . $project_id . PHP_EOL;  
54 -// } 43 + $project_id = Redis::rpop('updateProgress');
  44 + echo date('Y-m-d H:i:s') . ' start: ' . $project_id . PHP_EOL;
  45 + try {
  46 + ProjectServer::useProject($project_id);
  47 + $this->getUpdateProgress($project_id);
  48 + DB::disconnect('custom_mysql');
  49 + }catch (\Exception $e){
  50 + echo date('Y-m-d H:i:s') . ' error: ' . $project_id . '->' . $e->getMessage() . PHP_EOL;
  51 + }
  52 + echo date('Y-m-d H:i:s') . ' end: ' . $project_id . PHP_EOL;
55 } 53 }
56 54
57 /** 55 /**
@@ -36,7 +36,7 @@ class Kernel extends ConsoleKernel @@ -36,7 +36,7 @@ class Kernel extends ConsoleKernel
36 $schedule->command('inquiry_count')->dailyAt('01:00')->withoutOverlapping(1); // 询盘统计数据,每天凌晨执行一次 36 $schedule->command('inquiry_count')->dailyAt('01:00')->withoutOverlapping(1); // 询盘统计数据,每天凌晨执行一次
37 $schedule->command('domain_info')->dailyAt('01:00')->withoutOverlapping(1);// 更新域名|证书结束时间,每天凌晨1点执行一次 37 $schedule->command('domain_info')->dailyAt('01:00')->withoutOverlapping(1);// 更新域名|证书结束时间,每天凌晨1点执行一次
38 $schedule->command('last_inquiry')->dailyAt('04:00')->withoutOverlapping(1);// 最近一次询盘信息 38 $schedule->command('last_inquiry')->dailyAt('04:00')->withoutOverlapping(1);// 最近一次询盘信息
39 -// $schedule->command('update_progress')->everyThirtyMinutes()->withoutOverlapping(1);//监控更新 39 + $schedule->command('update_progress')->everyThirtyMinutes()->withoutOverlapping(1);//监控更新
40 } 40 }
41 41
42 /** 42 /**