From 0cdf0ae0ef31408b47ebeb569b6b2acceb579a9e Mon Sep 17 00:00:00 2001 From: Carson Reinke Date: Fri, 19 May 2017 14:23:29 -0400 Subject: [PATCH] Format numeric every for server --- lib/resque/scheduler/server.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/resque/scheduler/server.rb b/lib/resque/scheduler/server.rb index 286118a7..d0bd2e09 100644 --- a/lib/resque/scheduler/server.rb +++ b/lib/resque/scheduler/server.rb @@ -185,13 +185,13 @@ def schedule_interval(config) def schedule_interval_every(every) every = [*every] - s = 'every: ' << every.first + s = 'every: ' << "#{every.first}#{'s' if every.first.is_a?(Numeric)}" return s unless every.length > 1 s << ' (' meta = every.last.map do |key, value| - "#{key.to_s.tr('_', ' ')} #{value}" + "#{key.to_s.tr('_', ' ')} #{value}#{'s' if value.is_a?(Numeric)}" end s << meta.join(', ') << ')' end