改进 任务删除
This commit is contained in:
parent
e465e7469b
commit
37119da4fb
@ -31,10 +31,7 @@ public function __construct()
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
//
|
||||
|
||||
// 删除所有状态不为 pending 的任务
|
||||
Task::where('status', '!=', 'pending')->delete();
|
||||
|
||||
// 删除所有大于 1 天的任务
|
||||
Task::where('created_at', '<', now()->subDays(1))->delete();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user