mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-05-04 05:05:58 +00:00
cron indicator improvement
This commit is contained in:
@@ -46,7 +46,7 @@
|
||||
"/chunks/app-others.js": "/chunks/app-others.js?id=0cc43e1d502eec99",
|
||||
"/chunks/app-sign-in-out.js": "/chunks/app-sign-in-out.js?id=d3ed0a81743ac3ba",
|
||||
"/chunks/app-adsense.js": "/chunks/app-adsense.js?id=4ee8de4ac0dae19e",
|
||||
"/chunks/app-server.js": "/chunks/app-server.js?id=4959028c9adbedfa",
|
||||
"/chunks/app-server.js": "/chunks/app-server.js?id=b07d804fe4dd8132",
|
||||
"/chunks/app-language.js": "/chunks/app-language.js?id=83a53ba4d233ae46",
|
||||
"/chunks/homepage.js": "/chunks/homepage.js?id=3a8a009996ff94d0",
|
||||
"/chunks/dynamic-page.js": "/chunks/dynamic-page.js?id=0585ee757e04fe8d",
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
v-if="logs.length"
|
||||
v-for="(log, i) in logs"
|
||||
:key="i"
|
||||
class="md:flex md:space-y-0 space-y-3 items-center justify-between border-b border-dashed border-light py-3 dark:border-opacity-5"
|
||||
class="flex md:space-y-0 space-y-3 items-center justify-between border-b border-dashed border-light py-3 dark:border-opacity-5"
|
||||
>
|
||||
<div class="text-left">
|
||||
<b class="block text-sm font-bold">
|
||||
@@ -89,7 +89,7 @@
|
||||
<div
|
||||
v-for="(isWritable, file, i) in writable"
|
||||
:key="i"
|
||||
class="md:flex md:space-y-0 space-y-3 items-center justify-between border-b border-dashed border-light py-3 dark:border-opacity-5"
|
||||
class="flex md:space-y-0 space-y-3 items-center justify-between border-b border-dashed border-light py-3 dark:border-opacity-5"
|
||||
>
|
||||
<div class="text-left">
|
||||
<b class="block text-sm font-bold">/{{ file }}</b>
|
||||
|
||||
@@ -70,8 +70,8 @@ class Kernel extends ConsoleKernel
|
||||
->daily()
|
||||
->at('00:20');
|
||||
|
||||
// Store latest cron timestamp
|
||||
cache()->set('latest_cron_update', now()->toString());
|
||||
$schedule->call(fn () => cache()->set('latest_cron_update', now()->toString()))
|
||||
->everyMinute();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -29,7 +29,7 @@ class GetServerStatusController
|
||||
// Add cron info
|
||||
$status['cron'] = [
|
||||
'running' => isRunningCron(),
|
||||
'lastUpdate' => isRunningCron() ? format_date(cache()->get('latest_cron_update')) : '',
|
||||
'lastUpdate' => isRunningCron() ? format_date(cache()->get('latest_cron_update')) : null,
|
||||
];
|
||||
|
||||
return $status;
|
||||
|
||||
@@ -44,7 +44,7 @@ if (! function_exists('isRunningCron')) {
|
||||
*/
|
||||
function isRunningCron(): bool
|
||||
{
|
||||
return cache()->has('latest_cron_update') && Carbon::parse(cache()->get('latest_cron_update'))->diffInMinutes(now()) < 2;
|
||||
return cache()->has('latest_cron_update') && Carbon::parse(cache()->get('latest_cron_update'))->diffInMinutes(now()) <= 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user