Before:
# app/jobs/destroy_problems_by_app_job.rb
class DestroyProblemsByAppJob < ApplicationJob
queue_as :default
# @param app_id [String]
def perform(app_id)
app = App.find_by(id: app_id)
ProblemDestroy.execute(app.problems)
end
end
After:
# app/jobs/destroy_problems_by_app_job.rb
class DestroyProblemsByAppJob < ApplicationJob
queue_as :default
# @param app [Errbit::App]
def perform(app)
ProblemDestroy.execute(app.problems)
end
end
Before:
After: