mail@pastecode.io avatar
a year ago
976 B
Create a shell script to verify the airflow webserver and scheduler.
Verify the use cases and start/restart accordingly

1. Both webserver and scheduler down. Backup the log files for analysis and start both the processes.

2. Webserver is Up and scheduler is down. Backup only logs of scheduler and start the scheduler process.

3. Webserver is Down and Scheduler is Up. Backup only logs os webserver and start the webserver process.

4. Both webserver and scheduler is Up. No backup of logs, kill the processes and restart both services.

Check Points:
a. *.pid files to be removed of corresponding process before start/restart.

b. In any of the above use cases, if webserver is started, need to introduce a timing delay and then check the "airflow-webserver.err" file for any errors. 
Only is no errors the start/restart is considered to be success.
Note: For case 4, if airflow-webserver.err has errors then to exit the process, not starting the scheduler