fix: render both sides of the comparison with the same formatter

This commit is contained in:
hugocasa
2026-08-28 17:59:21 +02:00
parent 65a8542109
commit 18380822ea
2 changed files with 6 additions and 7 deletions
@@ -35,7 +35,6 @@
emptyString,
formatCron,
msToReadableTime,
msToReadableTimeShort,
sendUserToast,
cronV1toV2
} from '$lib/utils'
@@ -944,8 +943,9 @@
/>
{#if outlastingMs && runsSample?.interval_s}
<Alert type="warning" size="xs" title="Runs are outlasting the interval">
Recent runs have been taking about {msToReadableTimeShort(outlastingMs, 0)}, against {msToReadableTime(
runsSample.interval_s * 1000
Recent runs have been taking about {msToReadableTime(outlastingMs, 0)}, against {msToReadableTime(
runsSample.interval_s * 1000,
0
)} between scheduled events. Script runs never overlap, so the next run is only queued once the
previous one has completed: this schedule is running less often than its cron asks
for. To keep the cadence, schedule a flow instead, which queues its next run when the
@@ -11,7 +11,6 @@
displayDate,
getLocalSetting,
msToReadableTime,
msToReadableTimeShort,
storeLocalSetting
} from '$lib/utils'
import { runsOutlastingInterval } from '$lib/components/schedules/scheduleDrift'
@@ -657,9 +656,9 @@
<AlertTriangle size={14} class="text-yellow-600" />
{#snippet text()}
<div>
Runs have been taking about {msToReadableTimeShort(outlastingMs, 0)}, longer
than the {msToReadableTime(interval_s! * 1000)} between scheduled events, so
this schedule is running less often than its cron asks for.
Runs have been taking about {msToReadableTime(outlastingMs, 0)}, longer than
the {msToReadableTime(interval_s! * 1000, 0)} between scheduled events, so this
schedule is running less often than its cron asks for.
</div>
{/snippet}
</Popover>