-
Notifications
You must be signed in to change notification settings - Fork 19
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
feat(job_start_log): flag to enable logging of job start #13
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mdibaiee thanks for opening this PR 🎉 !
Changes look good but it would be great to see some new tests that shows the new feature works as expected 😃
@iMacTia Thanks. I agree tests would be great, I just added two. I noticed there seems to be seemingly duplicate code over here and here. I have changed the first one only now, and my manual tests were fine (Sidekiq was indeed logging start of jobs). I'm wondering how these two pieces of code related to each other. |
@mdibaiee thanks for adding the tests and for pointing out the code duplication. I'll review this PR again now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good and is code-covered now 👍
@mdibaiee I'd also add a test to ensure that the the starting log is NOT logged when the option is disabled, but to be honest is not a showstopper, so make it a "nice to have" 😄
@silviusimeria would you like to review as well?
Thanks @iMacTia . I just addd a test case for "not logging" a job_start log by default. 👍 |
Hi guys, The logging server middleware was removed in Sidekiq 5.0.0, see: https://github.com/mperham/sidekiq/blob/master/Changes.md If I remember correctly, when I added support for sidekiq 5, the common logging logic was moved in If you want to port the job start log to older sidekiq versions you might need to change the middleware part too. |
@iMacTia so, what's new here? do I need to make additional changes? |
@mdibaiee: @silviusimeria point was that the changes you did to |
@iMacTia I see, we use Sidekiq-5.x.x, so I think we're good with the current functionality. Testing the change on older Sidekiq versions would also be of additional effort and I would rather skip that. 😁 Looking forward to using this in our production system 🚀 |
@mdibaiee sure no problem! Thanks for contributing! |
fixes #4