feat: 自动归档已完成任务

This commit is contained in:
kuaifan
2022-01-06 01:12:21 +08:00
parent 369577a2c8
commit 7c64b27ef4
6 changed files with 106 additions and 12 deletions

View File

@@ -3,6 +3,7 @@
namespace App\Http\Controllers;
use App\Module\Base;
use App\Tasks\AutoArchivedTask;
use App\Tasks\DeleteTmpTask;
use Hhxsv5\LaravelS\Swoole\Task\Task;
use Redirect;
@@ -58,6 +59,8 @@ class IndexController extends InvokeController
// 删除过期的临时表数据
Task::deliver(new DeleteTmpTask('wg_tmp_msgs', 1));
Task::deliver(new DeleteTmpTask('tmp', 24));
// 自动归档任务
Task::deliver(new AutoArchivedTask());
return "success";
}