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

Sidekiq improvements #19

Open
andreareginato opened this issue Dec 5, 2012 · 0 comments
Open

Sidekiq improvements #19

andreareginato opened this issue Dec 5, 2012 · 0 comments

Comments

@andreareginato
Copy link
Contributor

Right now if the queue system is not working we loose the changes. Actually there is no easy way to restore them. For this reason we need to add a scheduled operation (sidekiq allow this) that check all types not taken in consideration for any reason. The flow to implement is this.

  • add a new field worker_status to the type model
  • it can have 3 states: ready, running, finished
  • when a change happens the type is set to ready
  • the worker take it up and set the status to running
  • when the task is completed the worker set the status to finished

Now, if something goes wrong with the queue, we simply set the chron task to check every minute which types have the worker_status set to ready. Only if a type has changed and is not taken into the queue.

NOTE types are not going to be defined too often and they are usually fixed. So, make those changes only if really needed. In that case think at the whole flow.
NOTE This issue will take 1/2 days.
NOTE make things idempotent.

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

No branches or pull requests

1 participant