移除 限流

This commit is contained in:
iVampireSP.com 2022-11-23 03:25:12 +00:00
parent cc0ac68325
commit 2f6b337f1c

View File

@ -36,13 +36,13 @@ public function handle()
{
// 获取运行完成的时间
$last_run = Cache::get('servers_updated_at', false);
if ($last_run !== false) {
// 如果和上次运行时间间隔小于一分钟,则不运行
if (now()->diffInMinutes($last_run) < 1) {
return;
}
}
// $last_run = Cache::get('servers_updated_at', false);
// if ($last_run !== false) {
// // 如果和上次运行时间间隔小于一分钟,则不运行
// if (now()->diffInMinutes($last_run) < 1) {
// return;
// }
// }
//
Module::where('status', '!=', 'maintenance')->whereNotNull('url')->chunk(100, function ($modules) {
@ -106,7 +106,7 @@ public function handle()
}
// 缓存运行完成的时间
Cache::put('servers_updated_at', now(), now()->addMinutes(10));
// Cache::put('servers_updated_at', now(), now()->addMinutes(10));
});
}
}