I am scheduling node transitions on minute granularity.
But it does not work efficiently when lightning_scheduler_cron() runs per minute.
A copy of https://www.drupal.org/node/3102027.
| Comment | File | Size | Author |
|---|---|---|---|
| #10 | lightning_scheduler-3102295-10.patch | 3.37 KB | joseph.olstad |
| #9 | lightning_scheduler-3102295-9.patch | 3.29 KB | joseph.olstad |
Comments
Comment #2
abhaysaraf commentedPatch added.
Also an extention to https://www.drupal.org/node/3068420.
Comment #3
abhaysaraf commentedComment #4
abhaysaraf commentedUpdated patch name following convention https://www.drupal.org/patch/submit
Comment #5
phenaproximaComment #6
joseph.olstadconvert this into a patch:
and also, this to speed up cron jobs, previously my cron job was taking 4 to 5 minutes because the cron was reprocessing all records since the beginning of unix time (Jan 1, 1970), every cron run. Really we only have to go back as far as the last cron run but this logic goes back 8 weeks , to improve it, get the timestamp of the last cron run, and make it run a couple hours before that or a day before just to make sure everything is processed and nothing is missed based on time zone differences so avoid timezone issues, maybe two days in front of that for reprocessing just to be safe. However going back to Jan 1 1970 every cron run is a bit too much to ask of a server.
Comment #7
joseph.olstadroll up a patch based on my comment above, set it for review
Comment #8
joseph.olstadComment #9
joseph.olstadpatch for review
Comment #10
joseph.olstadnew patch
no need to go weeks back.
Comment #11
joseph.olstadComment #12
joseph.olstadDue to the severity of this performance issue (going back and reprocessing all nodes modified since the beginning of unix time (jan 1 1970) over and over again) I am increasing this to a critical.
This module is not long-term usable without this patch unless you only have a very small amount of content.
Comment #14
joseph.olstadhmm, comparing 9 and 10 test results.
worst case scenario, go with patch 9.
Comment #15
kaszarobertThe issue's original problem was fixed in #3102027: Transition does not happen accurately when lightning_scheduler_cron() runs each minute
The performance issue mentioned later will be dealt with in #3379796: Performance - Prevent redundant processing back to January 1st 1970 on every cron run.
So this issue duplicates both, to eliminate confusion I'm closing this in favor of the separate issues.