-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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 worker using a a “custom” queue name gets assigned to “default” queue #872
Comments
There's two different Workers in this case. The delay extension uses a separate worker which uses the default queue. On 24 Apr 2013, at 22:45, JigneshGohel-BoTreeConsulting notifications@github.com wrote:
|
@mperham Thanks for your prompt response.So can you guide me with the solution on what is required to to make the implementation behave in desired manner as mentioned in my first post? Will it be correct if I do not use delay extension and consider the fact that BulkEmailWorker#perform_async should move the email sending task to background? Update: Replacing
WITH
and invoking
doesn't even enqueue the task in any of the queues.I tried even with the default queue.
Thanks, |
My requirement, in-case it helps in understanding what I am trying to do, is like from my application a user can create Mail Templates with recipients wherein s/he can schedule the mails too at a specific date-time and also define its recurring interval.Once the mail template is created in the database, at the schedule date-time and if recurring later at recurring schedules the application should send emails in background.I am trying to achieve this using Sidekiq. Thanks, |
Everything works fine if you remove the custom queue name. Just use the default queue. |
Sorry it was my misunderstanding due to which I posted the comment #872 (comment). Actually the worker did processed the task as can be seen from the Stats.processed value.
However I misunderstood that it was not processed in the sense that I didn't received any email after replacing
WITH
But it was obvious that I didn't received any mail because I didn't invoked deliver on BulkMailer.general_mail(mail_template.id) after removing delay from my ActionMailer class. I did that change i.e.
and I am getting the mails being sent in the background triggered by the worker and it is being assigned to the custom queue too if I use a custom queue name. My apologies once again for the inconvenience caused due to my own misunderstandings and @mperham appreciate your prompt help. Thanks, |
If I define a worker like below with a custom queue name
end
and I invoke the worker like this:
it doesn't work (in other words doesn't send email).
Inspecting the data in redis I found following:
redis 127.0.0.1:6379> keys *
As can be seen above the worker is assigned to queue "default" and I guess due to this the worker is unable to process.
I started sidekiq using following command for above scenario:
However when I remove from my worker following
sidekiq_options(queue: :bulk_mails, backtrace: true)
and start sidekiq using following command:
it works (in other words it sends email successfully).
/config/sidekiq.yml
I have just started using Sidekiq and am novice to it.So please bear with me if I there is some concept which I misunderstood or unaware about.
I need to get rid of the mentioned problem so that my worker gets assigned to the desired queue and also processed successfully.
Thanks,
Jignesh
The text was updated successfully, but these errors were encountered: