app/models/scheduled_task.rb in tasks_scheduler-0.7.0 vs app/models/scheduled_task.rb in tasks_scheduler-0.8.0
- old
+ new
@@ -20,13 +20,13 @@
end
end
def timeout
@timeout ||= begin
- r = Integer(ENV[DEFAULT_TIMEOUT_ENVVAR_NAME])
+ r = Integer(ENV.fetch(DEFAULT_TIMEOUT_ENVVAR_NAME, nil))
r.positive? ? r.seconds : DEFAULT_TIMEOUT
- rescue ArgumentError, TypeError
- DEFAULT_TIMEOUT
+ rescue ArgumentError, TypeError
+ DEFAULT_TIMEOUT
end
end
end
enable_listable