summaryrefslogtreecommitdiffstats
path: root/openstack
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2012-11-24 02:44:33 +0000
committerGerrit Code Review <review@openstack.org>2012-11-24 02:44:33 +0000
commit62c832b9b363096f93f4512a7aed35668c4d6a87 (patch)
tree519b1036e63d6263734ac2e1bc58ba60bc09ef8d /openstack
parentb4c0767e5529eb5d58aed90643354dbee83efefe (diff)
parent68fe32580ea4f7058bb15821566fa8ff10876ec5 (diff)
downloadoslo-62c832b9b363096f93f4512a7aed35668c4d6a87.tar.gz
oslo-62c832b9b363096f93f4512a7aed35668c4d6a87.tar.xz
oslo-62c832b9b363096f93f4512a7aed35668c4d6a87.zip
Merge "raise_on_error parameter shouldn't be passed to task function"
Diffstat (limited to 'openstack')
-rw-r--r--openstack/common/periodic_task.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/openstack/common/periodic_task.py b/openstack/common/periodic_task.py
index edfee9b..8a32162 100644
--- a/openstack/common/periodic_task.py
+++ b/openstack/common/periodic_task.py
@@ -87,9 +87,8 @@ class _PeriodicTasksMeta(type):
class PeriodicTasks(object):
__metaclass__ = _PeriodicTasksMeta
- def run_periodic_tasks(self, *args, **kwargs):
+ def run_periodic_tasks(self, context, raise_on_error=False):
"""Tasks to be run at a periodic interval."""
- raise_on_error = kwargs.get('raise_on_error', False)
for task_name, task in self._periodic_tasks:
full_task_name = '.'.join([self.__class__.__name__, task_name])
@@ -104,7 +103,7 @@ class PeriodicTasks(object):
LOG.debug(_("Running periodic task %(full_task_name)s"), locals())
try:
- task(self, *args, **kwargs)
+ task(self, context)
except Exception as e:
if raise_on_error:
raise