删除 超过 3 天 的工单
This commit is contained in:
parent
991976930f
commit
86cfe11de5
@ -42,6 +42,14 @@ public function handle()
|
||||
continue;
|
||||
}
|
||||
|
||||
if ($workOrder->status === 'error') {
|
||||
// 如果 created_at 超过 3 天 use Carbon
|
||||
if (now()->diffInDays($workOrder->created_at) > 3) {
|
||||
$workOrder->delete();
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
$http = Http::remote($workOrder->module->api_token, $workOrder->module->url);
|
||||
$workOrder->status = 'open';
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user