diff --git a/app/jobs/broadcast_request_job.rb b/app/jobs/broadcast_request_job.rb index 9bf2cc749..3de2debda 100644 --- a/app/jobs/broadcast_request_job.rb +++ b/app/jobs/broadcast_request_job.rb @@ -3,13 +3,13 @@ class BroadcastRequestJob < ApplicationJob queue_as :broadcast_request - def perform(request_id:) + def perform(request_id) request = Request.where(id: request_id).first return unless request return if request.broadcasted_at.present? if request.planned? # rescheduled for future after this job was created - BroadcastRequestJob.delay(run_at: request.schedule_send_for).perform_later(request_id: request.id) + BroadcastRequestJob.delay(run_at: request.schedule_send_for).perform_later(request.id) return end diff --git a/app/models/request.rb b/app/models/request.rb index e724ce13d..d4a8480c9 100644 --- a/app/models/request.rb +++ b/app/models/request.rb @@ -63,7 +63,7 @@ def messages_by_contributor def self.broadcast!(request) if request.planned? - BroadcastRequestJob.delay(run_at: request.schedule_send_for).perform_later(request_id: request.id) + BroadcastRequestJob.delay(run_at: request.schedule_send_for).perform_later(request.id) RequestScheduled.with(request_id: request.id).deliver_later(User.all) else Contributor.active.with_tags(request.tag_list).each do |contributor|