Hello Everyone, Is there any way to run airflow sc...
# troubleshooting
m
Hello Everyone, Is there any way to run airflow scheduler in an background after logout, i want my scheduler will always run.
m
Adding the
-D
flag should do it!
meltano invoke airflow scheduler -D
and similarly, for the airflow webserver:
meltano invoke airflow webserver -D
(More in the Meltano docs.) You can also run:
meltano invoke airflow scheduler --help
to see the other command line arguments you can use with the scheduler or webserver. For example, here is what it says about the
-D
flag:
-D, --daemon Daemonize instead of running in the foreground
m
@mahangu_weerasinghe i run this command and it stops
message has been deleted
@edward_ryan @kai_yokoyama @tom_mcgrail @gunnar
e
that readout looks correct are you using the Meltano DAG generator? https://gitlab.com/meltano/files-airflow/-/blob/master/bundle/orchestrate/dags/meltano.py
@monika_rajput
m
No
I think first we need to change the sequentialexecutor as it's good for testing but not in production environment.
d
@monika_rajput When the scheduler is deamonized, it will continue running in the background even when your terminal/shell lets you enter another command. The point of deamonization is that it isn’t dependent on a specific shell, and doesn’t block you from following it up with another command
e
Thanks @douwe_maan this was very helpful
m
Thank you so much @douwe_maan.
e
@gunnar
@tom_mcgrail here's our thread about scheduling / daemonizing
m
@connor_flynn
Hello @douwe_maan @mahangu_weerasinghe, Thank you for the previous help on scheduler. Need some suggestions as we shifted from sqlite database to postgresdb , the
meltano invoke airflow scheduler -D
Commnad is not working anymore. It is not scheduling the pipeline so i need to run
meltano invoke airflow scheduler
to run the scheduler. As i researched that we need to change the
executor
, right now it is
sequentialExecutor.
So my question is how we can change the executor for airflow while using
postgresdb
. Right now we believe might be celeryExecutor could be the solution but have not sure how to change from s`equentialExecutor` to
celeryExceutor.
@edward_ryan