Skip to content
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

Add support for ActiveJob #38

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

vijaykramesh
Copy link

We were trying to use this gem and realized it was working for normal resque jobs but not for ActiveJob jobs. The main difference seems to be ActiveJob has #perform as an instance method, not a class method - and ActiveJob doesn't support all the magical callbacks based on the method being named something like after_perform_foobar. Both of these issues are alleviated by this PR. My test passes at least, I will update our application locally to pull from my fork to confirm the tracking is doing what we expect and will report back here.

@vijaykramesh
Copy link
Author

github is being odd and not showing the rebuild that travis ran: https://travis-ci.org/github/alanpeabody/resque-job-stats/builds/672765041

@baarkerlounger
Copy link

baarkerlounger commented Apr 27, 2020

Seems like this works for enqueued and performed but not the other statistics? Specifically I think you need to include the around_perform methods as well to get those to work.

@lukeasrodgers
Copy link
Collaborator

will try to have a look at this PR this weekend

@jeniaefimov
Copy link

Hey @lukeasrodgers is it any chance that you'll have a time to take a look at this MR? Or maybe I can help with it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants