Reputation: 4294
Hi I've just started using Airflow, but I cannot manage to make the task in the quickstart run: airflow run example_bash_operator runme_0 2015-01-01
.
I've just created a conda environment with python 2.7.6 and installed airflow
through pip
which installed airflow==1.8.0
. Then I ran the commands listed here https://airflow.incubator.apache.org/start.html.
When I try to run the first task instance, by looking at the UI nothing seems to happen. Here's the output of the command:
(airflow) ✔ se7entyse7en in ~/Projects/airflow $ airflow run example_bash_operator runme_0 2015-01-01
[2017-07-28 12:06:22,992] {__init__.py:57} INFO - Using executor SequentialExecutor
Sending to executor.
[2017-07-28 12:06:23,950] {__init__.py:57} INFO - Using executor SequentialExecutor
Logging into: /Users/se7entyse7en/airflow/logs/example_bash_operator/runme_0/2015-01-01T00:00:00
On the other hand the backfill works fine: airflow backfill example_bash_operator -s 2015-01-01 -e 2015-01-02
.
What am I missing?
Upvotes: 2
Views: 525
Reputation: 849
The run command is used to run a single task instance. But it will only be able to run if you have cleared any previous runs. To clear the run:
Now you will be able to run the task with the cmd that you initially had.
To view the logs for this task you can run: vi /Users/se7entyse7en/airflow/logs/example_bash_operator/runme_0/2015-01-01T00:00:00
I had a task like:
t2 = BashOperator(
task_id='sleep',
depends_on_past=False,
bash_command='sleep 35',
dag=dag)
I was able to see the changes in the state of the task as it was getting executed.
Upvotes: 0
Reputation: 4294
I've just found that if a single task is ran then it is listed under Browse > Task Instances
as part of any DAG.
Upvotes: 1