Merge "update docstring for driver_periodic_task's parallel param"

This commit is contained in:
Jenkins 2015-02-05 00:14:47 +00:00 committed by Gerrit Code Review
commit 5a5b72718b
1 changed files with 7 additions and 1 deletions

View File

@ -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