def run(self, args=None, kwargs=None, **options):
"""
Executes the pipeline and returns the chain of tasks used.
Evaluates all the after parameters from the pipeline decorators to create
a DAG, and then partial ordering that ensures all prerequisites are met
before launching tasks.
The return value of each task in the pipeline is provided to the next
task as its first positional argument.
By tagging pipeline elements in their decorators, you can choose which
elements should be run by :meth:`run`.
:param list args: Arguments passed as an input to the kickoff (first) task
in the pipeline
:param dict kwargs: Keyword arguments passed as an input to the kickoff
(first) task in the pipeline
:param list tagged_as: Execute only tasks with no tags and those tagged as
specified using `tags` parameters to :func:`@pipeline`
:param dict required_kwargs: Keyword arguments that :func:`@pipeline`
elements might require.
:returns: :class:`celery.AsyncResult`
:raises: :exc:`DependencyError`
"""
tasks = self._get_pipeline(**options)
return tasks.apply_async(args=args, kwargs=kwargs)
评论列表
文章目录