-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Migrate update main image background job to sidekiq #5345
Migrate update main image background job to sidekiq #5345
Conversation
This is a port of app/jobs/update_main_image_background_job.rb that works with Sidekiq instead of DelayedJob.
This updates all references to UpdateMainImageBackgroundHexJob so they now call UpdateMainImageBackgroundHexWorker, which works with Sidekiq instead of DelayedJob.
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.
Hi @codekatas-magmalabs, thanks a lot for your PR!
I think the code is fine, maybe we'll have to reconsider the priority but overall it's a solid PR.
There's one failing test though, see https://travis-ci.com/thepracticaldev/dev.to/builds/142954923, the reason why it's failing it's because the test is using assert_enqueued_with
which is based on ActiveJob, but we're not using that anymore. You can replace it with sidekiq_assert_enqueued_with
, see my comment here: #5305 (comment)
Thank you!
Also, don't forget to sign the CLA up here |
Hey @codekatas-magmalabs, thanks for the contribution! Would you like to update the specs as Rhymes mentioned? I know life has funny ways of getting busy. I'm happy to update it or assist as well if that's easier, just let me know. Thanks! |
@@ -429,7 +429,7 @@ def evaluate_markdown | |||
def update_main_image_background_hex |
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 also being triggered in an after_save
callback which means the record will not be in the database yet if it is new. Can you change this so it's fired in an after_commit
callback? THANK YOU!
@codekatas-magmalabs I went ahead and pushed up the requested changes. We're in the home stretch of finishing off this epic (#5305). Thank you so much for getting this going and please let me know if you have any questions! |
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, thanks @codekatas-magmalabs and @atsmith813!
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.
LGTM 🚀
What type of PR is this? (check all applicable)
Description
Related Tickets & Documents
#5305
Added to documentation?
[optional] What gif best describes this PR or how it makes you feel?