增加 删除一直在 pending 的主机
This commit is contained in:
parent
aa80c6d6d2
commit
852dbcb50e
@ -39,5 +39,12 @@ public function handle()
|
||||
dispatch(new \App\Jobs\Remote\Host($host, 'delete'));
|
||||
}
|
||||
});
|
||||
|
||||
// 查找部署时间超过3天以上的 host
|
||||
Host::where('status', 'pending')->where('created_at', '<', now()->subDays(3))->chunk(100, function ($hosts) {
|
||||
foreach ($hosts as $host) {
|
||||
dispatch(new \App\Jobs\Remote\Host($host, 'delete'));
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user