module Resque::Reports::Extensions::EventCallbacks::ClassMethods
TODO: сделать гибкой логику колбеков и хендлеров Defines callbacks
Attributes
error_callback[R]
progress_callback[R]
Public Instance Methods
on_error(&block)
click to toggle source
Set callback on error @yield [error] block to be executed when error occurred @yieldparam [Exception] error
# File lib/resque/reports/extensions/event_callbacks.rb, line 28 def on_error(&block) @error_callback = block end
on_progress(&block)
click to toggle source
Set callback for watching progress of export @yield [progress] block to be executed on progress @yieldparam progress [Integer] current progress @yieldparam total [Integer] data length
# File lib/resque/reports/extensions/event_callbacks.rb, line 21 def on_progress(&block) @progress_callback = block end