airflow icon indicating copy to clipboard operation
airflow copied to clipboard

task_concurrency=1 not able to limit the active tasks to 1

Open barmanand opened this issue 6 years ago • 5 comments

Apache Airflow version: 1.10.10

Environment:

  • Cloud provider or hardware configuration:
  • OS (e.g. from /etc/os-release):
  • Kernel (e.g. uname -a):
  • Install tools:
  • Others:

What happened:

I have set the task_concurrency=1 for BashOperator, like below sleep_task = BashOperator(task_id=f"task1", bash_command="sleep 2", execution_timeout=None, timeout=20, retries=3, retry_delay=timedelta(seconds=30), task_concurrency=1, dag=dag) It should limit the active tasks for this sleep_task to 1 across dags as per definition.

What you expected to happen:

Setting task_concurrency has no impact

How to reproduce it:

Add task_concurrency to any operator and try to run many dags at same time, so that these two tasks will be running at same time

Anything else we need to know:

barmanand avatar Jun 19 '20 16:06 barmanand

Thanks for opening your first issue here! Be sure to follow the issue template!

boring-cyborg[bot] avatar Jun 19 '20 16:06 boring-cyborg[bot]

We seem to be experiencing this same issue.

andytrigg avatar Jul 28 '20 02:07 andytrigg

still an issue?

tooptoop4 avatar Nov 19 '20 20:11 tooptoop4

any update on this?

goakgun avatar Dec 13 '20 22:12 goakgun

Just tested this on 2.0.0rc3 and it's behaving correctly -- only one task runs at a time..

ashb avatar Dec 15 '20 10:12 ashb