Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F3764855
D3275.id8414.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
903 B
Referenced Files
None
Subscribers
None
D3275.id8414.diff
View Options
diff --git a/roles/paas-docker/containers/files/airflow/airflow.sh.jinja b/roles/paas-docker/containers/files/airflow/airflow.sh.jinja
--- a/roles/paas-docker/containers/files/airflow/airflow.sh.jinja
+++ b/roles/paas-docker/containers/files/airflow/airflow.sh.jinja
@@ -41,6 +41,15 @@
COMMAND=version
fi
+if [ "$COMMAND" = "shell" ]; then
+ PROGRAM=bash
+ COMMAND=
+ COMMAND_ARGS=
+else
+ PROGRAM=airflow
+ COMMAND_ARGS=$@
+fi
+
dsn="$(credential {{ credentials.postgresql }} username):$(credential {{ credentials.postgresql }})@{{ services.postgresql }}"
docker run -it --rm \
--network {{ network }} \
@@ -48,4 +57,4 @@
-e CONNECTION_CHECK_MAX_COUNT=0 \
-e AIRFLOW__DATABASE__SQL_ALCHEMY_CONN="postgresql+psycopg2://$dsn/airflow" \
$EXTRA_ARGS \
- nasqueron/airflow bash -c "airflow $COMMAND $@"
+ nasqueron/airflow $PROGRAM $COMMAND $COMMAND_ARGS
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 23, 08:49 (17 h, 56 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2256987
Default Alt Text
D3275.id8414.diff (903 B)
Attached To
Mode
D3275: Allow to enter a shell for Airflow maintenance operations
Attached
Detach File
Event Timeline
Log In to Comment