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

Two Rails apps on the same server, but only one Sidekiq instances is working correctly #141

Closed
faramund opened this issue Oct 28, 2015 · 1 comment

Comments

@faramund
Copy link

Hi,
I use sidekiq-unique-jobs with Action Mailer deliver_later method to make emails unique. My configuration is:

Sidekiq.default_worker_options = {
  unique: :until_executed,
  unique_args: ->(args) { args.first.except('job_id') }
}

I use:
sidekiq 3.5.1
database redis (2.4.14)
redis-namespace (1.5.2)
sidekiq-unique-jobs (3.015)

Locally everything works correctly.

I have a production app and a bet app on the same server.

redis configuration for production:
redis_address: redis://127.0.0.1:6379/0
redis_namespace: paymentlink-prod

redis configuration for beta:
redis_address: redis://127.0.0.1:6379/1
redis_namespace: paymentlink-beta

When everything works correctly on a production, then no jobs are queued on a beta. And vice versa. After deleting:

Sidekiq.default_worker_options = {
  unique: :until_executed,
  unique_args: ->(args) { args.first.except('job_id') }
}

the production and the beta work correctly.

I have no idea what is wrong. Maybe it is bug or not.

@faramund faramund changed the title Two Rails apps on the same server, but only one Sidekiq instances is working Two Rails apps on the same server, but only one Sidekiq instances is working correctly Oct 28, 2015
@mhenrixon
Copy link
Owner

I strongly recommend you don't use ActiveJob as a first step and see if that fixes it. If not report back with details about the workers. Preferably some example application that replicates the problem.

I also recommend you have a look at setting Sidekiq.logger.level = Logger::DEBUG and see what the output says as well. Is it duplicated? Which arguments are used for uniqueness etc.

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