You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lib/active_job/jobs_relation.rb
+5
Original file line number
Diff line number
Diff line change
@@ -154,7 +154,12 @@ def discard_job(job)
154
154
end
155
155
156
156
# Dispatch the provided job.
157
+
#
158
+
# This operation is only valid for blocked or scheduled jobs. It will
159
+
# raise an error +ActiveJob::Errors::InvalidOperation+ otherwise.
157
160
defdispatch_job(job)
161
+
raiseActiveJob::Errors::InvalidOperation,"This operation can only be performed on blocked or scheduled jobs, but this job is #{job.status}"unlessjob.blocked? || job.scheduled?
0 commit comments