修复 单独发给模块时的情况
This commit is contained in:
parent
b54d923efe
commit
4856073401
@ -38,10 +38,13 @@ public function handle()
|
||||
WorkOrder::whereIn('status', ['pending', 'error'])->with(['module', 'user', 'host', 'replies'])->chunk(100, function ($workOrders) {
|
||||
foreach ($workOrders as $workOrder) {
|
||||
|
||||
if ($workOrder->host->status === 'pending') {
|
||||
continue;
|
||||
if ($workOrder->host) {
|
||||
if ($workOrder->host->status === 'pending') {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if ($workOrder->status === 'error') {
|
||||
// 如果 created_at 超过 3 天 use Carbon
|
||||
if (now()->diffInDays($workOrder->created_at) > 3) {
|
||||
|
Loading…
Reference in New Issue
Block a user