-
Notifications
You must be signed in to change notification settings - Fork 21.5k
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
Let Sidekiq and Que set provider_job_id #20056
Conversation
Thank you! This is a pretty critical integration point with Sidekiq since all its APIs require the JID to work. |
Added Que job_id reporting as well. |
Nice work @jvanbaarsen |
@jvanbaarsen could you rebase your branch? Thanks |
@rafaelfranca Yes! will do |
When a job is added to Sidekiq by ActiveJob, make sure we still can get the original job_id provider by Sidekiq. We do this by adding the sidekiq jid to provider_job_id field on the job object. Partly fixes rails#18821 Signed-off-by: Jeroen van Baarsen <jeroenvanbaarsen@gmail.com>
You might also want to make your adapter tests use the same test as the On Thu, May 7, 2015 at 3:48 PM, Jeroen van Baarsen <notifications@github.com
Kevin D. Deisz |
5f6a766
to
97c2bd1
Compare
@kddeisz Ah yeah, good point! Will do as well |
14e80bf
to
30107c6
Compare
@rafaelfranca You want me to squash the commits as well? |
It is fine these two commits |
@@ -1,3 +1,8 @@ | |||
* Allow `Sidekiq` and `que` to report the job id back to `ActiveJob::Base` as |
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.
Instead of adding a new entry maybe we should change the entry bellow. WDYT?
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.
@rafaelfranca Yes sounds good.
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.
Seems fine
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.
While we're here, are there any other adapters that need this? resque?
On Thu, May 7, 2015 at 3:58 PM, Jeroen van Baarsen <notifications@github.com
wrote:
In activejob/CHANGELOG.md
#20056 (comment):@@ -1,3 +1,8 @@
+* AllowSidekiq
andque
to report the job id back toActiveJob::Base
as@rafaelfranca https://github.com/rafaelfranca Yes sounds good.
—
Reply to this email directly or view it on GitHub
https://github.com/rails/rails/pull/20056/files#r29889786.
Kevin D. Deisz
TrialNetworks - part of DrugDev
Software Developer
383 Elliot Street, Suite G
Newton, MA 02464
+1 617.952.4071 x134 (office)
+1 703.615.0396 (mobile)
kdeisz@trialnetworks.com
Signed-off-by: Jeroen van Baarsen <jeroenvanbaarsen@gmail.com>
30107c6
to
29fcbc2
Compare
|
||
Fixes #18821. | ||
|
||
*Kevin Deisz* | ||
*Kevin Deisz* And *Jeroen van Baarsen* |
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.
@kddeisz you agree with this?
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.
I'm fine with that!
On Thu, May 7, 2015 at 4:00 PM, Jeroen van Baarsen <notifications@github.com
wrote:
In activejob/CHANGELOG.md
#20056 (comment):Fixes #18821.
- Kevin Deisz
- Kevin Deisz And Jeroen van Baarsen
@kddeisz https://github.com/kddeisz you agree with this?
—
Reply to this email directly or view it on GitHub
https://github.com/rails/rails/pull/20056/files#r29889974.
Kevin D. Deisz
TrialNetworks - part of DrugDev
Software Developer
383 Elliot Street, Suite G
Newton, MA 02464
+1 617.952.4071 x134 (office)
+1 703.615.0396 (mobile)
kdeisz@trialnetworks.com
@rafaelfranca I think its ready to be merged (Once the tests are green 💃 ) |
Let Sidekiq and Que set provider_job_id
Will this get into 4.2 or 5+ only? |
5+ only. |
@mperham So, in current versions there's no way to find the underlying |
Not that I'm aware of.
|
@diddeb Not out of the box. Only way you can achieve this, is by monkeypatching. |
Thanks @jvanbaarsen + @mperham... Freedom Patching it is. |
When a job is added to Sidekiq or Que by ActiveJob, make sure we still can get the
original job_id provider by Sidekiq or Que. We do this by adding the Sidekiq jid or Que job_id to
provider_job_id field on the job object.
Partly fixes #18821
This PR is an extension on the PR submitted by @kddeisz : #19910