Skip to content
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

Tasks get schedules multiple times when multiple workers are running #9

Closed
rikvdh opened this issue Jun 22, 2014 · 3 comments
Closed

Comments

@rikvdh
Copy link

rikvdh commented Jun 22, 2014

Hi Mark,

I found a bug, but I don't quite know how to solve it. I'm seeing tasks rescheduled to quickly before timeout has passed. I nailed it down to this line:
Model/QueuedTask.php:154

The problem here is that you reference to $task which is part of the loop a few lines higher. This results in always the last element. Since I use your Plugin and plugins are parsed later the last (alphabetically) task's timeout wins. Which is always 10 seconds.

So, when 10 seconds are passed, the task is rescheduled when other un-finished tasks are also found. (Otherwise another if-statement catches it.)

Any ideas for fixes?

Greetings,

Rik

@dereuromark
Copy link
Owner

Interesting, that no one found that sooner - or that I didnt see any issues with it in the past.
I was wondering if you were able to produce a PR with the suggested changes.

@rikvdh
Copy link
Author

rikvdh commented Jun 23, 2014

Yesterday I couldn't come up with a solution and I was wondering if you had any ideas. But I'll give it another go. :)

@dereuromark
Copy link
Owner

Closing in favor of the PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants