Skip to content

Commit

Permalink
Merge pull request #1217 from ledsusop/master
Browse files Browse the repository at this point in the history
Add an example on pool usage in the documentation
  • Loading branch information
bolkedebruin committed Mar 28, 2016
2 parents d7c95a8 + 2f48a53 commit 1db892b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions docs/concepts.rst
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,16 @@ it a number of worker slots. Tasks can then be associated with
one of the existing pools by using the ``pool`` parameter when
creating tasks (i.e., instantiating operators).

.. code:: python
aggregate_db_message_job = BashOperator(
task_id='aggregate_db_message_job',
execution_timeout=timedelta(hours=3),
pool='ep_data_pipeline_db_msg_agg',
bash_command=aggregate_db_message_job_cmd,
dag=dag)
aggregate_db_message_job.set_upstream(wait_for_empty_queue)
The ``pool`` parameter can
be used in conjunction with ``priority_weight`` to define priorities
in the queue, and which tasks get executed first as slots open up in the
Expand Down

0 comments on commit 1db892b

Please sign in to comment.