-
-
Notifications
You must be signed in to change notification settings - Fork 10.4k
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
SchedulingDefault_spec.js fails with Node v6.8.0 (setImmediate problem) #7555
Comments
weird weird. When i decrease the timeout diff from So if the timeout get's invoked earlier to now, then it works? https://github.com/TryGhost/Ghost/blob/master/core/server/scheduling/SchedulingDefault.js#L173 |
refs TryGhost#7555 - temporary fix to make travis green - that should not have a any bad effect on scheduling - we just let the job awake a bit later - the job logic is strong enough to catch the job if setTimeout awakes too late (that can happen, because setTimeout is not accurate) - if (moment().diff(moment(Number(timestamp))) <= self.beforePingInMs) --> is smaller ensures that even if the diff is negative, it get's executed
refs #7555 - temporary fix to make travis green - that should not have a any bad effect on scheduling - we just let the job awake a bit later - the job logic is strong enough to catch the job if setTimeout awakes too late (that can happen, because setTimeout is not accurate) - if (moment().diff(moment(Number(timestamp))) <= self.beforePingInMs) --> is smaller ensures that even if the diff is negative, it get's executed
We’ve noticed the same kind of issue with post scheduling: if there are at least 3 schedules, the scheduler won’t publish (at least) the last one. Used Setup
|
@marcuspoehls I can't reproduce what you are describing.
What do you mean by saying "didn’t recognize the third post"? |
Node issue at nodejs/node#9084 |
@marcuspoehls Can you please contact me in our slack channel? |
@kirrg001 Hi Katharina, sorry for the confusion. I found the actual issue: Ghost doesn’t pick up scheduled posts correctly after restarting the process. Looks like while testing and reproducing the behaviour I didn’t let the process run continuously. The
That results in a options object like this:
If there are already scheduled posts, they need to be created in between the Looks like the filter on |
@marcuspoehls yeah we can kill from/to filters and just fetch all scheduled posts you have left in the database 👍 |
refs TryGhost#7555 - remove filters, they can cause problems
refs TryGhost#7555 - remove filters, they can cause problems
refs #7555 - remove filters, they can cause problems
refs #7555 - remove filters, they can cause problems
Node |
It's fixed in |
refs TryGhost#7555 - temporary fix to make travis green - that should not have a any bad effect on scheduling - we just let the job awake a bit later - the job logic is strong enough to catch the job if setTimeout awakes too late (that can happen, because setTimeout is not accurate) - if (moment().diff(moment(Number(timestamp))) <= self.beforePingInMs) --> is smaller ensures that even if the diff is negative, it get's executed
refs TryGhost#7555 - remove filters, they can cause problems
refs TryGhost#7555 - temporary fix to make travis green - that should not have a any bad effect on scheduling - we just let the job awake a bit later - the job logic is strong enough to catch the job if setTimeout awakes too late (that can happen, because setTimeout is not accurate) - if (moment().diff(moment(Number(timestamp))) <= self.beforePingInMs) --> is smaller ensures that even if the diff is negative, it get's executed
refs TryGhost#7555 - remove filters, they can cause problems
We suddenly have a broken build https://travis-ci.org/TryGhost/Ghost/jobs/167170509.
grunt test:core/test/unit/scheduling/SchedulingDefault_spec.js
fails on Node v6.8.0The last job never get's executed, because
setImmediate
does not get triggered!The text was updated successfully, but these errors were encountered: