admin_context = context.get_admin_context()
stacks = db_api.stack_get_all(admin_context)
for s in stacks:
- user_creds = db_api.user_creds_get(s.user_creds_id)
- stack_context = context.RequestContext.from_dict(user_creds)
self._timer_in_thread(s.id, s.name,
self._periodic_watcher_task,
- context=stack_context,
sid=s.id)
+ @request_context
def identify_stack(self, context, stack_name):
"""
The identify_stack method returns the full stack identifier for a
('watch rule removed?', str(ex)))
return
for wr in wrs:
- rule = watchrule.WatchRule.load(context, watch=wr)
+ rule = watchrule.WatchRule.load(stack_context, watch=wr)
rule.evaluate()
+ @request_context
def create_watch_data(self, context, watch_name, stats_data):
'''
This could be used by CloudWatch and WaitConditions