]> review.fuel-infra Code Review - openstack-build/heat-build.git/commitdiff
Merge "Get db session from the context."
authorJenkins <jenkins@review.openstack.org>
Wed, 21 Nov 2012 19:46:31 +0000 (19:46 +0000)
committerGerrit Code Review <review@openstack.org>
Wed, 21 Nov 2012 19:46:31 +0000 (19:46 +0000)
1  2 
heat/db/api.py
heat/db/sqlalchemy/api.py
heat/engine/service.py

diff --cc heat/db/api.py
Simple merge
Simple merge
index 728c4725b375bcc4fb296c6491e4f4c876c4804b,fc0d40ae83fe6aaeb09847eea7e3d439125ea85c..3597462e58b24702dc69e9143b022d4615d15f3b
@@@ -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
                          ('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