Module: Glider

Defined in:
lib/glider/component.rb,
lib/glider/utils.rb,
lib/glider/workflows.rb,
lib/glider/activities.rb,
lib/glider/process_manager.rb

Overview

singleton class handling all children, useful for daemonization

Defined Under Namespace

Modules: ProcessManager Classes: Component

Class Method Summary collapse

Class Method Details

.execute(domain_name, workflow_name, version, options = {}) ⇒ Object



7
8
9
10
11
12
# File 'lib/glider/utils.rb', line 7

def Glider.execute(domain_name, workflow_name, version, options={})
	swf = AWS::SimpleWorkflow.new
	domain = swf.domains[domain_name.to_s]
	options = { task_start_to_close_timeout: 5 }.merge(options)
	domain.workflow_types[workflow_name.to_s, version.to_s].start_execution options
end

.loggerObject



3
4
5
# File 'lib/glider/utils.rb', line 3

def Glider.logger
	$logger ||= Logger.new STDOUT
end

.signal(domain_name, workflow_id, signal_name, options = {}) ⇒ Object



14
15
16
17
18
19
# File 'lib/glider/utils.rb', line 14

def Glider.signal(domain_name, workflow_id, signal_name, options={})
	swf = AWS::SimpleWorkflow.new
	domain = swf.domains[domain_name.to_s]
	workflow_execution = domain.workflow_executions.with_workflow_id(workflow_id).with_status(:open).first
	workflow_execution.signal signal_name.to_s, options
end