作者 lyh

gx

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