-
Notifications
You must be signed in to change notification settings - Fork 280
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
Send arguments with exception in active job plugin #505
Conversation
@PlugIN73 Can you take a look at the tests? They are failing cause your change. This looks good to me, thanks for the PR! |
5d0da06
to
75fdd9a
Compare
@jondeandres oh) I fixed tests. But this build was failed without my changes https://travis-ci.org/rollbar/rollbar-gem/jobs/150082517 |
@jondeandres done :) all checks have passed. can you merge it? :) |
@jondeandres ping :) |
@@ -9,6 +9,11 @@ class TestJob | |||
include Rollbar::ActiveJob | |||
|
|||
attr_reader :job_id | |||
attr_accessor :arguments | |||
|
|||
def initialize(*arguments) |
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.
@PlugIN73 I guess with this you are giving the same behavior than for a real ActiveJob job. I have a doubt, I think arguments
will return the arguments for the perform
method, no?
Can you make this test more close to a real scenario?
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.
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.
This is how ActiveJob does it
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.
Actually this is confusing, ActiveJob kinda does it this way, peform_now
basically calls perform(*arguments)
where arguments is set in init. So to get these to match, the arguments should match up with what is passed to perform because all of this is fake.
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.
Needs a rebase and some test work.
@PlugIN73 , maybe you resolve conflicts? |
@ArturMoczulski what do you want to do w/ this PR? It's over 2 years old now... |
@ArturMoczulski @jessewgibbs I'm just creating an issue for this and will link it here and close this PR. |
Going through it now |
This has now been merged in PR #772 |
Hi! We are using active job plugin and we have troubles to understand what's wrong in our code without arguments of this job.
In Active Job, arguments it's method like job_id that you are using