From 920687733fb79d6de930a62491ec274cb96383fb Mon Sep 17 00:00:00 2001 From: Ruby Loo Date: Wed, 4 Feb 2015 15:38:54 +0000 Subject: [PATCH] update docstring for driver_periodic_task's parallel param This updates the docstring for the parallel parameter to make it more obvious what a value of False means; that it will cause the conductor's other periodic tasks to be blocked. Change-Id: Idc4504fdf5b08095f52d21ad938496c88daab742 --- ironic/drivers/base.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ironic/drivers/base.py b/ironic/drivers/base.py index 56d42a016e..222797b0e4 100644 --- a/ironic/drivers/base.py +++ b/ironic/drivers/base.py @@ -617,7 +617,13 @@ def driver_periodic_task(parallel=True, **other): def task(self, manager, context): # do some job - :param parallel: whether to run this task in a separate thread + :param parallel: If True (default), this task is run in a separate thread. + If False, this task will be run in the conductor's periodic task + loop, rather than a separate greenthread. False should be used with + caution, as it will cause all other periodic tasks to be blocked + from starting while the non-parallel task is running. Long running + tasks, especially any tasks that make a remote call (to a BMC, + HTTP, etc.) must be parallelized. :param other: arguments to pass to @periodic_task.periodic_task """ # TODO(dtantsur): drop all this magic once