作者 ZhengBing He

log

... ... @@ -43,14 +43,17 @@ class PushNotify extends Command
while (true) {
try {
$tick = Tickets::where('ding', 0)
->where('submit_side', 2)
// ->where('project_id', 1)
->first();
if (!$tick) {
echo now() . " WARNING | 没有待推送的工单\n";
sleep(3);
continue;
}
$project = $tick->project;
if ($project->version != 6 || $project->is_del == 1) {
echo now() . " WARNING | 项目版本或状态异常 \n";
$tick->ding = 1;
$tick->save();
continue;
... ... @@ -63,7 +66,7 @@ class PushNotify extends Command
->value('friend_id');
if (empty($message_push->friend_id))
{
echo now() . " 项目ID:{$project->table_id} 没有绑定企微群\n";
echo now() . " WARNING | 项目ID:{$project->table_id} 没有绑定企微群\n";
$tick->ding = 1;
$tick->save();
continue;
... ... @@ -82,9 +85,9 @@ class PushNotify extends Command
$message_push->save();
$tick->ding = 1;
$tick->save();
echo now() . " 项目ID:{$project->table_id} 工单ID:{$tick->id} 推送成功\n";
echo now() . " INFO | 项目ID:{$project->table_id} 工单ID:{$tick->id} 推送成功\n";
}catch (\Exception $exception){
echo date('Y-m-d H:i:s')." ".$exception->getMessage()."\n";
echo date('Y-m-d H:i:s')." ERROR | ".$exception->getMessage()."\n";
break;
}
}
... ...