-
Notifications
You must be signed in to change notification settings - Fork 1
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
Incorrect middleware configuration in README.md #1
Comments
Hi @navidemad, thanks for the kind words on the gem. Could you make a small Rails project to reproduce the error? It shouldn't need to be more than initializing a new repo, adding sidekiq and this gem, and an initializer. That would help significantly so that I can see your error. I created this repo, so feel free to look at that. |
Hello, here how to reproduce it. class NotifyJob
include Sidekiq::Job
sidekiq_options queue: :default
def perform(user_id)
puts "NotifyJob is running with parameter #{user_id}"
end
end Run a redis-service, sidekiq, and a rails console in different tabs. NotifyJob.perform_async(2) |
Ah, thank you very much. I mistakenly only provided a single middleware for the client API for sidekiq. I have a new PR with middleware for the client and the server. I've also updated the README to indicate how to use each. Please try #3 in your project
Let me know if this works for you. If so, I will cut a new release. I also look forward to any insight this provides you on NewRelic. I do not yet have a project on both Ruby 3.2 and NewRelic so I have not been able to use this code in production yet. |
Hello,
Firstly, I'd like to express my gratitude for your gem. It's evident that a lot of hard work has been put into it.
While setting up, I followed the instructions provided in the README.md. However, I kept encountering an error every time a job was enqueued to Sidekiq. The error mentioned a mismatch in the number of arguments. Upon further investigation, I found that the documentation mentions the use of server_middleware when it should have been client_middleware.
For reference, the Sidekiq documentation on middleware creation can be found here: https://github.com/sidekiq/sidekiq/wiki/Middleware.
I thought I'd bring this to your attention for the benefit of future users. Thanks again for your excellent work on this gem!
Warm regards,
The text was updated successfully, but these errors were encountered: