humanmade / Cavalcade

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

Include interval in realkey to allow for changed schedules. #65

Closed peterwilsoncc closed 5 years ago

peterwilsoncc commented 5 years ago

Includes the interval when generating keys for comparing old and new values of the cron array so events with a changed recurrence are re-saved.

In the database, this deletes the old job and then saves the event with a new ID. I considered using array_intersect_key() and looping through the result to see if any intervals had changed but decided this would probably be a bigger perf hit on large tables than the extra database write. Did I test this theory? No.

See #64

rmccue commented 5 years ago

How does this work back-compat wise? Seems like it would potentially break a lot of stuff relying on the cron array.

peterwilsoncc commented 5 years ago

Yeah, that’s a mistake. I was aiming for $real_key which is only used by cavalcade.

-- Sent from my phone

On 23 Oct 2018, at 11:49 am, Ryan McCue notifications@github.com wrote:

How does this work back-compat wise? Seems like it would potentially break a lot of stuff relying on the cron array.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

peterwilsoncc commented 5 years ago

Bug reverted in 84f153bc19355386a0da9502578c5f2c488869fa and actual intention carried out in c578579c1d6aa25b972eae76e925ff32a9f7f47d.