An Interest In:
Web News this Week
- March 31, 2024
- March 30, 2024
- March 29, 2024
- March 28, 2024
- March 27, 2024
- March 26, 2024
- March 25, 2024
September 13, 2019 02:33 pm GMT
Original Link: https://dev.to/devteam/call-for-contributions-move-delayedjob-calls-to-activejob-5d7l
Call for Contributions: Move DelayedJob Calls to ActiveJob
Hey folks, we've been working on a gradual migration from DelayedJob
to ActiveJob
within the DEV codebase.
Move delay calls to ActiveJob #3136
lightalloy commented on Jun 12, 2019
As described in #2497, to be less dependent of DelayedJob
we also need to move jobs which are created by calling delay
method to ActiveJob
:
Here is the list of the calls:
- [x]
Slackbot.ping
- [ ]
MembershipMailer.delay.new_membership_subscription_email
- [ ]
MembershipMailer.delay.subscription_update_confirm_email
- [ ]
MembershipMailer.delay.subscription_cancellation_email
- [ ]
user.follow
- [ ]
reaction.create
- [ ]
ArticleAnalyticsFetcher.new.update_analytics
- [ ]
HtmlVariantSuccess.create
- [ ]
HtmlVariantTrial.create
- [ ]
message.send_push
- [ ]
RssReader.new.fetch_user
- [ ] several calls in
trigger_delayed_index
Actions for each of the calls:
- create a corresponding
ActiveJob
, specify a queue name - call the required method inside a job
- replace the
delay
method calls with a jobperform_later
call - you may need to modify the existing tests by using
perform_enqueued_job
instead ofrun_background_jobs_immediately
helper
Remember to pass record id
s (if needed) instead of ActiveRecord objects to a job to avoid deserialization errors (#1621)
Take a look at the issue. We have a lot of merged pull requests to use as a guideline to get you started, for example...
Moved send_mention_notification to ActiveJob #3566
lightalloy commented on Jul 29, 2019
What type of PR is this? (check all applicable)
- [x] Refactor
Description
- moved send_mention_notification to
ActiveJob
- used @copasetickid's pr and refined it
Related Tickets & Documents
#1996
Happy coding!
Original Link: https://dev.to/devteam/call-for-contributions-move-delayedjob-calls-to-activejob-5d7l
Share this article:
Tweet
View Full Article
Dev To
An online community for sharing and discovering great ideas, having debates, and making friendsMore About this Source Visit Dev To