You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Jeremiah Lowin (JIRA)" <ji...@apache.org> on 2016/06/01 16:59:59 UTC
[jira] [Commented] (AIRFLOW-205) Unable to force a TaskInstance
with a pool assigned to it
[ https://issues.apache.org/jira/browse/AIRFLOW-205?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15310641#comment-15310641 ]
Jeremiah Lowin commented on AIRFLOW-205:
----------------------------------------
[~withnale] I'm unable to replicate this with the DAG pasted below. Can you provide a demonstration?
Running webserver + CeleryExecutor with a Postgres backend. With the DAG paused, if I press "run" in the UI once (with or without "force"), the task becomes queued. If I press it again, the task runs successfully. I'm running with a fresh airflowdb and without a scheduler.
{code}
from datetime import datetime
from airflow.models import DAG, Pool
from airflow.operators import BashOperator
import airflow
# -----------------------------------------------------------------\
# Create a Pool
# -----------------------------------------------------------------/
session = airflow.settings.Session()
pool = (
session.query(Pool)
.filter(Pool.pool == 'AIRFLOW-205')
.first())
if not pool:
session.add(Pool(pool='AIRFLOW-205', slots=8))
session.commit()
# -----------------------------------------------------------------\
# DEFINE THE DAG
# -----------------------------------------------------------------/
default_args = {
'owner': 'Airflow',
'start_date': datetime(2016, 5, 1),
}
# Create the dag object
dag = DAG('AIRFLOW-205', default_args=default_args)
task = BashOperator(
bash_command='echo Hi!',
dag=dag,
task_id='task',
pool='AIRFLOW-205')
{code}
> Unable to force a TaskInstance with a pool assigned to it
> ---------------------------------------------------------
>
> Key: AIRFLOW-205
> URL: https://issues.apache.org/jira/browse/AIRFLOW-205
> Project: Apache Airflow
> Issue Type: Bug
> Reporter: Paul Rhodes
> Priority: Minor
>
> It seems that I can force a paused task to run if I select force from the GUI but if the job includes a pool that job will never run, even if there is space in the pool.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)