lib/worker_glass/timeout.rb in worker-glass-0.2.1 vs lib/worker_glass/timeout.rb in worker-glass-0.2.2

- old
+ new

@@ -20,10 +20,10 @@ # Executes a business logic with additional timeouts # @param args Any arguments that we passed when scheduling a background job # @raise [WorkerGlass::Errors::TimeoutNotDefined] if we didn't define timeout def perform(*args) - fail Errors::TimeoutNotDefined unless self.class.timeout + raise Errors::TimeoutNotDefined unless self.class.timeout ::Timeout.timeout(self.class.timeout, Errors::TimeoutError) { super } end end end