-
Notifications
You must be signed in to change notification settings - Fork 22.2k
Add explicit base class for ActiveJob jobs #19034
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
Conversation
|
Any reason not to create ApplicationJob when a new app is first created, like ApplicationController? |
|
@georgeclaghorn Since not everyone might be using ActiveJob. But maybe it would be better to have it there right from the get go. @rafaelfranca @tamird what do you think? |
|
I remember at some point there was Rails PR for |
|
|
|
Ok! I'll add it to the app generator :-) and I'll see if I can figure out the warning :) |
|
@cristianbica Im looking into the warnings, but not really sure how to tackle this. And besides, I checked with controllers. Its not something we do there (You can use a controller without inhereting from ApplicationController, without a warning). What do you think? |
Some really wild thoughts:
|
|
@cristianbica What do you think? |
|
Yes talked with the rails team and the warning is not something we want. We don't want to prohibit subclassing |
|
@cristianbica Ok thanks! I'll fix those later tonight. |
2172a10 to
50ac9f5
Compare
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.
@cristianbica Somehow I had to change this line otherwise the tests did not pass. Do you have any idea why that is? It is because I added the application_job.rb file?
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.
probably yes
|
@cristianbica What can I do to get this merged? |
|
Please squash your commits. Otherwise seems good to me. |
* Jobs generated now inherent from ApplicationJob * ApplicationJob inherents from ActiveJob::Base * Added entry to changelog Signed-off-by: Jeroen van Baarsen <jeroenvanbaarsen@gmail.com>
8dddc62 to
929a794
Compare
|
@cristianbica Squashed commits. Waiting for build to be green |
|
@cristianbica Test are passing, and the commits are squashed. Anything left for me to do? |
Add explicit base class for ActiveJob jobs
|
nice. thanks @jvanbaarsen |
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.
For the future, this should go on top of the file :)
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.
Ah ok :)
Fixes #16976
/cc @tamird @rafaelfranca