FastMovieAI 二开基线 v1.0 (完整源码)

This commit is contained in:
李建琦
2026-08-26 18:41:02 +08:00
parent fad7690c0c
commit d54584f70d
888 changed files with 105571 additions and 1 deletions
@@ -0,0 +1,27 @@
<?php
namespace app\process;
use app\model\Uploads;
use Shopwwi\WebmanFilesystem\FilesystemFactory;
use support\Log;
use Workerman\Crontab\Crontab;
class AutoDeleteUpload
{
public function onWorkerStart($worker)
{
# 查询冻结超过24小时的订单,解冻
new Crontab('0 */1 * * * *', function(){
$models=Uploads::whereNotNull('auto_delete_time')->whereTime('auto_delete_time','<',date('Y-m-d H:i:s'))->select();
foreach ($models as $model) {
try {
$filesystem = FilesystemFactory::get($model->channels);
$filesystem->delete($model->path);
$model->delete();
} catch (\Throwable $th) {
Log::error('删除文件"'.$model->path.'"失败:'.$th->getMessage(),$th->getTrace());
}
}
});
}
}