-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
wp_get_schedule()
not supported, causes issues with Jetpack 4.4
#29
Comments
I've started adding a proper schedule field in https://github.com/dd32/Cavalcade/tree/add-schedule-support It still needs an upgrade routine, and probably the ability for the plugin to operate on an out-of-date table (unless manually upgrading tables prior to upgrading the plugin is an option). |
We've hit into this as well. @dd32 Is your branch ready for a pull request? |
@rmccue I've been using it locally (not on W.org) successfully without issue (With Jetpack). It lacks any form of upgrade routine to add the column to the database, and will probably explode if activated on a older schema. |
Better to file the PR early. :) As to how we handle upgrades, I'd add detection for the column and use it if we can, trying to avoid errors if possible. We can potentially store a version in network options if needed for performance. The actual upgrade itself I think is best on a CLI command, and we can add a |
This defines the latest database version Cavalcade uses.
A schedule column was added in #62. |
Currently cavalcade doesn't support
wp_get_schedule()
properly - it always returns__fake_schedule
. This isnt' a problem for WordPress normally, however it has caused issues with the latest Jetpack release.Consider the following code, boiled down from https://plugins.trac.wordpress.org/browser/jetpack/tags/4.4/sync/class.jetpack-sync-actions.php?marks=295-302#L289
Cavalcade will return
__fake_schedule
forwp_get_schedule()
and cause it to endlessly clear the hook and requeue it again.As we've run into this on WordPress.org, I've temporarily put the following in place: dd32@fbd23d2
Unfortunately as pointed out in the commit, this is only a temporary solution, in the event that two schedules with identical timings, but different names, there's a good chance that it'll return the incorrect schedule.
I don't really see a way around this other than storing the schedule name in the database which a job is attached to, that probably means an extra field in the jobs table.
The text was updated successfully, but these errors were encountered: