module SimplerWorkflow
Default exception handler. Just logs to the logger and re-raise so the exception can be managed as usual.
Constants
- VERSION
Attributes
after_fork[W]
Public Instance Methods
after_fork(&block)
click to toggle source
Sets the code to be called after a process fork when a block is provided. Returns the previously set block (or nil) otherwise.
@param block The block that will be called after a process is forked. @return Proc the block that was passed earlier (or nil)
# File lib/simpler_workflow.rb, line 31 def after_fork(&block) block ? (@after_fork = block) : @after_fork end
child_processes()
click to toggle source
The list of child processes that have been forked from the main process.
# File lib/simpler_workflow.rb, line 37 def child_processes @child_processes ||= [] end
domain(domain_name)
click to toggle source
Provides a handle to a domain.
# File lib/simpler_workflow.rb, line 11 def domain(domain_name) @domains ||= {} @domains[domain_name.to_sym] ||= Domain.new(domain_name) end
exception_reporter(&block)
click to toggle source
# File lib/simpler_workflow.rb, line 41 def exception_reporter(&block) if block_given? @exception_reporter = DefaultExceptionReporter.new(&block) end @exception_reporter || DefaultExceptionReporter.new end
exception_reporter=(exception_handler)
click to toggle source
# File lib/simpler_workflow.rb, line 49 def exception_reporter=(exception_handler) @exception_reporter = exception_handler end
logger()
click to toggle source
The logger used. Falls back to the Rails logger.
# File lib/simpler_workflow.rb, line 22 def logger $logger || Rails.logger end
swf()
click to toggle source
Provides a handle to the SimpleWorkflow underlying service.
# File lib/simpler_workflow.rb, line 17 def swf @swf ||= ::AWS::SimpleWorkflow.new end