lib/good_job/capsule.rb in good_job-3.12.7 vs lib/good_job/capsule.rb in good_job-3.12.8
- old
+ new
@@ -53,12 +53,14 @@
@autostart = false
@running = false
end
# Shutdown and then start the capsule again.
- # @param timeout [nil, Numeric, Symbol] Seconds to wait for active threads.
+ # @param timeout [Numeric, Symbol] Seconds to wait for active threads.
# @return [void]
def restart(timeout: :default)
+ raise ArgumentError, "Capsule#restart cannot be called with a timeout of nil" if timeout.nil?
+
shutdown(timeout: timeout)
start
end
# @return [Boolean] Whether the capsule is currently running.