This is an automated email from the ASF dual-hosted git repository. kaxilnaik pushed a commit to branch v1-10-test in repository https://gitbox.apache.org/repos/asf/airflow.git
commit 1c38ef3199c22756b2909702d20c587ae7fa4f50 Author: Jarek Potiuk <[email protected]> AuthorDate: Fri Aug 14 16:13:34 2020 +0200 [AIRFLOW-5897] Allow setting -1 as pool slots value in webserver (#6550) This is a follow-up to 5d9216201b061cb35c9e349da0c4bb4c22c774e0. The original fix only applied to the www UI not the www_rbac one. (cherry picked from commit 03a46ddb0919d5327471a9442f961cf0636c1cb1) --- airflow/jobs/scheduler_job.py | 2 -- airflow/www_rbac/views.py | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/airflow/jobs/scheduler_job.py b/airflow/jobs/scheduler_job.py index 2fae2e3..685b57f 100644 --- a/airflow/jobs/scheduler_job.py +++ b/airflow/jobs/scheduler_job.py @@ -995,9 +995,7 @@ class SchedulerJob(BaseJob): priority_sorted_task_instances = sorted( task_instances, key=lambda ti: (-ti.priority_weight, ti.execution_date)) - # Number of tasks that cannot be scheduled because of no open slot in pool num_starving_tasks = 0 - num_tasks_in_executor = 0 for current_index, task_instance in enumerate(priority_sorted_task_instances): if open_slots <= 0: self.log.info( diff --git a/airflow/www_rbac/views.py b/airflow/www_rbac/views.py index 96d4079..f098b25 100644 --- a/airflow/www_rbac/views.py +++ b/airflow/www_rbac/views.py @@ -2382,7 +2382,7 @@ class PoolModelView(AirflowModelView): validators_columns = { 'pool': [validators.DataRequired()], - 'slots': [validators.NumberRange(min=0)] + 'slots': [validators.NumberRange(min=-1)] }
