diff options
| author | Angus Salkeld <asalkeld@redhat.com> | 2013-06-25 22:48:23 +1000 |
|---|---|---|
| committer | Angus Salkeld <asalkeld@redhat.com> | 2013-06-26 11:04:42 +1000 |
| commit | a7482eaa1857105e2c845a5d31e5f2b2e7b733ae (patch) | |
| tree | 3558008bb2ffd4984e6066df8d5c062e40e8cd82 /taskflow/patterns/distributed_flow.py | |
| parent | 6b17ba8ab7a20ff36026dfe90ddc0d9a80f341e0 (diff) | |
| download | taskflow-a7482eaa1857105e2c845a5d31e5f2b2e7b733ae.tar.gz | |
Fix most of the hacking rules
Hacking rules: H302, H303, H304, H401, H404
Change-Id: I38e62696724a99c5ebe74d95d477999bd91a2c9a
Diffstat (limited to 'taskflow/patterns/distributed_flow.py')
| -rw-r--r-- | taskflow/patterns/distributed_flow.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/taskflow/patterns/distributed_flow.py b/taskflow/patterns/distributed_flow.py index 3a12cb9..90b3f25 100644 --- a/taskflow/patterns/distributed_flow.py +++ b/taskflow/patterns/distributed_flow.py @@ -17,11 +17,11 @@ # License for the specific language governing permissions and limitations # under the License. +import celery import logging from taskflow import logbook -from celery import chord LOG = logging.getLogger(__name__) @@ -37,7 +37,7 @@ class Flow(object): logbook.add_workflow(name) def chain_listeners(self, context, initial_task, callback_task): - """ Register one listener for a task """ + """Register one listener for a task.""" if self.root is None: initial_task.name = '%s.%s' % (self.name, initial_task.name) self.root = initial_task.s(context) @@ -50,7 +50,7 @@ class Flow(object): initial_task.link(callback_task.s(context)) def split_listeners(self, context, initial_task, callback_tasks): - """ Register multiple listeners for one task """ + """Register multiple listeners for one task.""" if self.root is None: initial_task.name = '%s.%s' % (self.name, initial_task.name) self.root = initial_task.s(context) @@ -62,7 +62,7 @@ class Flow(object): initial_task.link(task.s(context)) def merge_listeners(self, context, initial_tasks, callback_task): - """ Register one listener for multiple tasks """ + """Register one listener for multiple tasks.""" header = [] if self.root is None: self.root = [] @@ -79,9 +79,9 @@ class Flow(object): # TODO(jlucci): Need to set up chord so that it's not executed # immediately. - chord(header, body=callback_task) + celery.chord(header, body=callback_task) def run(self, context, *args, **kwargs): - """ Start root task and kick off workflow """ + """Start root task and kick off workflow.""" self.root(context) LOG.info('WF %s has been started' % (self.name,)) |
