humanmade / Cavalcade

A better wp-cron. Horizontally scalable, works perfectly with multisite.
https://engineering.hmn.md/projects/cavalcade/
Other
519 stars 46 forks source link

Add proper support for `wp_get_schedule()` #33

Closed dd32 closed 6 years ago

dd32 commented 7 years ago

This is the basics of adding support for the schedule field of the WordPress Cron API, as used by wp_get_schedule().

This PR at time of submitting is lacking compatibility for running with an out-of-date table schema, and will probably explode.

See #29

rmccue commented 7 years ago

Per #29, I'm thinking we should allow it to run without the column, and allow upgrading at a time of choice via a CLI command. We can then also trigger_error with a notice to ensure it's not missed.

@joehoyle From a sysop perspective, does that process seem OK to you?

dd32 commented 7 years ago

FWIW That's the route I decided upon, but never implemented. I was going to add an int db-version as the return of HM\Cavalcade\Plugin\is_installed() (instead of true|false) to designate the schema version and switch based on that in HM\Cavalcade\Plugin\Job::save().

larssn commented 6 years ago

Anything in the way of merging this into master? Btw, was the original fork/repo deleted?

EDIT. I see an update script is required for this to go into master. EDIT2: This commit is so outdated at this point, that it needs to be reworked against the current master.

peterwilsoncc commented 6 years ago

I'm closing this PR off as it's quite out of date, some of it has been integrated in to #62

larssn commented 6 years ago

I've tried addressing some of these issues in 2 separate branches in my fork: https://github.com/larssn/Cavalcade/tree/feat-schedule-support https://github.com/larssn/Cavalcade/tree/fix-cache-miss-bug

If you wanna test em, they're merged into my dev branch: https://github.com/larssn/Cavalcade/commits/dev