Open ethitter opened 8 years ago
Thank you, I forgot to open this issue when I pushed the temporary fix.
This fix should be pushed as a new version to Wordpress.org
Before a new release is made, a proper fix for this issue is needed. The temporary fix from fcf1740 isn't sufficient, in my opinion.
Does anyone know why does that two lines there? Defining DOING_CRON constant when it is NOT a cron call does not make sense. I think the fix is fine.
Does anyone know why does that two lines there? Defining DOING_CRON constant when it is NOT a cron call does not make sense.
It's a legacy of how the code that led to this plugin stopped subsequent requests from triggering cron, either by requesting the endpoint, or calling spawn_cron()
. There are other ways of handling this now, but those didn't exist when the define was initially added.
The fix from fcf1740 is not sufficient as there's currently nothing reliably stopping two cron requests from running in parallel. The transient lock is insufficient, but this plugin's successor, Cron Control, provides guidance on how to better handle this.
By setting
DOING_CRON
on all non-cron requests, any functionality that blocks its execution by checking that constant is automatically and always blocked.Temporarily fixed by fcf1740, but we need to consider other ways of blocking cron requests not originating from this plugin.