Class: StackMate::WaitCondition
- Inherits:
-
Ruote::Participant
- Object
- Ruote::Participant
- StackMate::WaitCondition
show all
- Includes:
- Logging
- Defined in:
- lib/stackmate/participants/common.rb
Constant Summary
collapse
- @@handles =
{}
- @@conditions =
[]
Class Method Summary
collapse
Instance Method Summary
collapse
Methods included from Logging
configure_logger_for, #logger, logger_for
Class Method Details
.create_handle(handle_name, handle) ⇒ Object
86
87
88
|
# File 'lib/stackmate/participants/common.rb', line 86
def self.create_handle(handle_name, handle)
@@handles[handle_name] = handle
end
|
.delete_handle(handle_name) ⇒ Object
90
91
92
|
# File 'lib/stackmate/participants/common.rb', line 90
def self.delete_handle(handle_name)
@@handles.delete(handle_name)
end
|
.get_conditions ⇒ Object
98
99
100
|
# File 'lib/stackmate/participants/common.rb', line 98
def self.get_conditions()
@@conditions
end
|
Instance Method Details
#create ⇒ Object
63
64
65
66
67
68
69
|
# File 'lib/stackmate/participants/common.rb', line 63
def create
logger.debug "Entering #{workitem.participant_name} "
workitem[participant_name] = {}
@@conditions << self
stackname = workitem.fields['ResolvedNames']['AWS::StackName']
workitem[participant_name][:physical_id] = stackname + '-' + 'WaitCondition'
end
|
#delete ⇒ Object
71
72
73
74
|
# File 'lib/stackmate/participants/common.rb', line 71
def delete
logger.info "In delete #{participant_name}"
end
|
#on_workitem ⇒ Object
76
77
78
79
80
81
82
83
84
|
# File 'lib/stackmate/participants/common.rb', line 76
def on_workitem
if workitem['params']['operation'] == 'create'
create
else
delete
reply
end
end
|
#set_handle(handle_name) ⇒ Object
94
95
96
|
# File 'lib/stackmate/participants/common.rb', line 94
def set_handle(handle_name)
reply(workitem) if @@handles[handle_name]
end
|