From: Jenkins Date: Wed, 21 Nov 2012 19:46:31 +0000 (+0000) Subject: Merge "Get db session from the context." X-Git-Tag: 2014.1~1186 X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=18010f923b3860a16f2da485d5ac6380badec9e0;p=openstack-build%2Fheat-build.git Merge "Get db session from the context." --- 18010f923b3860a16f2da485d5ac6380badec9e0 diff --cc heat/engine/service.py index 728c4725,fc0d40ae..3597462e --- a/heat/engine/service.py +++ b/heat/engine/service.py @@@ -86,10 -96,17 +96,11 @@@ class EngineService(service.Service) 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 @@@ -415,9 -426,10 +438,10 @@@ ('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