lib/rocket_job/plugins/restart.rb in rocketjob-3.2.1 vs lib/rocket_job/plugins/restart.rb in rocketjob-3.3.0

- old
+ new

@@ -85,12 +85,14 @@ private # Run again in the future, even if this run fails with an exception def rocket_job_restart_new_instance - logger.info('Job has expired. Not creating a new instance.') - return if expired? + if expired? + logger.info('Job has expired. Not creating a new instance.') + return + end attrs = rocket_job_restart_attributes.reduce({}) { |attrs, attr| attrs[attr] = send(attr); attrs } rocket_job_restart_create(attrs) end def rocket_job_restart_abort @@ -110,10 +112,10 @@ logger.info('Job already active, retrying after a short sleep') sleep(sleep_interval) end count += 1 end - logger.warn('New job instance not started since one is already active') + logger.warn("New job instance not started: #{job.errors.messages.join(', ')}") false end end end