lib/zhong/scheduler.rb in zhong-0.1.6 vs lib/zhong/scheduler.rb in zhong-0.1.7

- old
+ new

@@ -43,13 +43,10 @@ def every(period, name, opts = {}, &block) raise "must specify a period for #{name} (#{caller.first})" unless period job = Job.new(name, opts.merge(@config).merge(every: period, category: @category), &block) - if jobs.key?(job.id) - @logger.error "duplicate job #{job}, skipping" - return - end + raise "duplicate job #{job}" if jobs.key?(job.id) @jobs[job.id] = job end def error_handler(&block)