lib/rocket_job/plugins/restart.rb in rocketjob-5.1.1 vs lib/rocket_job/plugins/restart.rb in rocketjob-5.2.0.beta1
- old
+ new
@@ -1,6 +1,6 @@
-require 'active_support/concern'
+require "active_support/concern"
module RocketJob
module Plugins
# Automatically starts a new instance of this job anytime it fails, aborts, or completes.
#
@@ -86,11 +86,11 @@
private
# Run again in the future, even if this run fails with an exception
def rocket_job_restart_new_instance
if expired?
- logger.info('Job has expired. Not creating a new instance.')
+ logger.info("Job has expired. Not creating a new instance.")
return
end
attributes = rocket_job_restart_attributes.each_with_object({}) { |attr, attrs| attrs[attr] = send(attr) }
rocket_job_restart_create(attributes)
end
@@ -107,10 +107,10 @@
job = self.class.create(attrs)
if job.persisted?
logger.info("Created a new job instance: #{job.id}")
return true
else
- logger.info('Job already active, retrying after a short sleep')
+ logger.info("Job already active, retrying after a short sleep")
sleep(sleep_interval)
end
count += 1
end
logger.error("New job instance not started: #{job.errors.messages.inspect}")