From 2f6b337f1c415b392733d9080a271eb5c427966d Mon Sep 17 00:00:00 2001 From: "iVampireSP.com" Date: Wed, 23 Nov 2022 03:25:12 +0000 Subject: [PATCH] =?UTF-8?q?=E7=A7=BB=E9=99=A4=20=E9=99=90=E6=B5=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Jobs/Module/FetchModule.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/app/Jobs/Module/FetchModule.php b/app/Jobs/Module/FetchModule.php index 53929f4..6ecd60d 100644 --- a/app/Jobs/Module/FetchModule.php +++ b/app/Jobs/Module/FetchModule.php @@ -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)); }); } }