Remove airflow-worker.pid file (#15553)

* Remove airflow-worker.pid file

Signed-off-by: lukasheinz92 <94646007+lukasheinz92@users.noreply.github.com>
This commit is contained in:
lukasheinz92 2022-12-24 14:18:31 +00:00 committed by GitHub
parent dcc07aca2f
commit 5622493778
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -46,6 +46,11 @@ airflow_worker_validate() {
# None
#########################
airflow_worker_initialize() {
# Remove airflow-worker.pid file if exists to prevent error after WSL restarts
if [ -f "$AIRFLOW_PID_FILE" ]; then
rm "$AIRFLOW_PID_FILE"
fi
# Change permissions if running as root
for dir in "$AIRFLOW_TMP_DIR" "$AIRFLOW_LOGS_DIR"; do
ensure_dir_exists "$dir"