在 ActiveJob 中执行以下操作有哪些优缺点:
选项 A:
# Controller
MyJob.perform_later(object.id)
# my_job.rb
def perform(object_id)
object = Object.find(object_id)
# do stuff
end
选项 B:
# Controller
MyJob.perform_later(object)
# my_job.rb
def perform(object)
# do stuff
end