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
88
89
90
|
# File 'lib/stackmate/participants/common.rb', line 88
def self.create_handle(handle_name, handle)
@@handles[handle_name] = handle
end
|
.delete_handle(handle_name) ⇒ Object
92
93
94
|
# File 'lib/stackmate/participants/common.rb', line 92
def self.delete_handle(handle_name)
@@handles.delete(handle_name)
end
|
.get_conditions ⇒ Object
100
101
102
|
# File 'lib/stackmate/participants/common.rb', line 100
def self.get_conditions()
@@conditions
end
|
Instance Method Details
#create ⇒ Object
65
66
67
68
69
70
71
|
# File 'lib/stackmate/participants/common.rb', line 65
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
73
74
75
76
|
# File 'lib/stackmate/participants/common.rb', line 73
def delete
logger.info "In delete #{participant_name}"
end
|
#on_workitem ⇒ Object
78
79
80
81
82
83
84
85
86
|
# File 'lib/stackmate/participants/common.rb', line 78
def on_workitem
if workitem['params']['operation'] == 'create'
create
else
delete
reply
end
end
|
#set_handle(handle_name) ⇒ Object
96
97
98
|
# File 'lib/stackmate/participants/common.rb', line 96
def set_handle(handle_name)
reply(workitem) if @@handles[handle_name]
end
|