[wp-trac] [WordPress Trac] #47223: Site Health Check: "last missed cron" test too aggressive
WordPress Trac
noreply at wordpress.org
Sun Aug 11 20:03:25 UTC 2019
#47223: Site Health Check: "last missed cron" test too aggressive
-------------------------------------------------+---------------------
Reporter: DavidAnderson | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 5.3
Component: Site Health | Version: 5.2
Severity: normal | Resolution:
Keywords: site-health needs-testing has-patch | Focuses:
-------------------------------------------------+---------------------
Comment (by Clorith):
I agree with comment:26 that it's better to look for worst cases, before
checking for intermediary ones, so let's look for missed ones before
seeing if any are late.
The approach in [attachment:"47223.5.diff"] looks reasonable to me, I
would make one change though, for the `has_late_cron()` check, store the
`( $cron->time - time() )` segment to a single variable, it saves having
to re-calculate it twice per if statement (and avoids time-shifts between
the two in some cases), and also improves readability.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/47223#comment:27>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list