diff options
| author | Jenkins <jenkins@review.openstack.org> | 2011-12-07 18:29:57 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2011-12-07 18:29:57 +0000 |
| commit | 8a8dd22aea07dcbbfa80ea5519dcb7bfb92b0217 (patch) | |
| tree | 85c6042044fda83c3b7954a6cf5fab3c69615e22 /nova/service.py | |
| parent | 42b571181b5f2793e03a4958071ef4c8067578e5 (diff) | |
| parent | 2b42968a53c70f2fd759a22e8e5aeadc18ae65f6 (diff) | |
Merge "Refactors periodic tasks to use a decorator."
Diffstat (limited to 'nova/service.py')
| -rw-r--r-- | nova/service.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/nova/service.py b/nova/service.py index fe6bf8e59..c56973907 100644 --- a/nova/service.py +++ b/nova/service.py @@ -252,9 +252,10 @@ class Service(object): except Exception: pass - def periodic_tasks(self): + def periodic_tasks(self, raise_on_error=False): """Tasks to be run at a periodic interval.""" - self.manager.periodic_tasks(context.get_admin_context()) + ctxt = context.get_admin_context() + self.manager.periodic_tasks(ctxt, raise_on_error=raise_on_error) def report_state(self): """Update the state of this service in the datastore.""" |
