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

Do not connect to redis at exit if not needed #4502

Merged

Conversation

misdoro
Copy link
Contributor

@misdoro misdoro commented Mar 23, 2020

A fix for #4498 introduced a callback that is executed at ruby VM exit and tries to connect to redis.

This callback is also executed in CI runs and in all other cases where sidekiq is loaded but not used with real redis.

As a work-around, keep the at_exit hook but communicate to redis only if there is something to send, i.e. the number of processed or failed jobs is greater than zero

A fix for sidekiq#4498 introduced
a call-back that is executed at ruby VM exit and tries to connect to redis.

This call-back is also executed in CI runs and in all other cases where sidekiq is loaded but not used with real redis.

As a work-around, keep the at_exit hook but communicate to redis only if there is something to send, i.e. the number of processed or failed jobs is greater than zero
@misdoro misdoro force-pushed the quickfix_do_not_connect_to_redis_on_exit branch from a55c1ed to b2b7399 Compare March 23, 2020 21:36
@misdoro
Copy link
Contributor Author

misdoro commented Mar 23, 2020

@mperham WDYT ?

@mperham
Copy link
Collaborator

mperham commented Mar 27, 2020

The root problem for many people is that they are using the sidekiq-cron gem and it has a bug where it is loading some Sidekiq internals (sidekiq/launcher) when it should not.

sidekiq-cron/sidekiq-cron#278

@aaronjensen
Copy link

Ah, we are using that, but we're also enterprise, so I'll work on moving us over to enterprise cron.

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

Successfully merging this pull request may close these issues.

None yet

3 participants