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

For 1.0.3 of capistrano-sidekiq, indices or processes are changed by rolling-restart #316

Open
unclok opened this issue Jan 24, 2023 · 0 comments

Comments

@unclok
Copy link

unclok commented Jan 24, 2023

Because we're not using neither of upstart or systemd, my team is still using 1.0.3.
The problem is each_process_with_index(reverse: true).
If we use rolling-restart from 1.0.3, pid_files has been loaded reverse direction. But because the function is using each_with_index, index attached in the list is not reverse direction, so pid_file and idx are not matching in this case.
Also, because this behavior overwrite the PID inside of the pid_file, half of previous process lose it's pid file and remain forever.

https://github.com/seuros/capistrano-sidekiq/blob/v1.0.3/lib/capistrano/tasks/sidekiq.rake#L115-L120
https://github.com/seuros/capistrano-sidekiq/blob/v1.0.3/lib/capistrano/tasks/sidekiq.rake#L176-L184

This is easy to fix (just change reverse:false to reverse:true), so I'll make a pull request soon.

unclok added a commit to unclok/capistrano-sidekiq that referenced this issue Jan 24, 2023
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

1 participant