Skip to content

Commit

Permalink
fix: make minio wait for nas (contd. et/somenergia-jardiner!46)(et/so…
Browse files Browse the repository at this point in the history
…menergia-jardiner!49)

* chore: add more echos

* chore: echo to stdout that task needs to wait a bit

* fix: add sleep to minio task to wait for nas
  • Loading branch information
diegoquintanav committed Dec 7, 2023
1 parent 639752c commit 1bdaed9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion dags/dag_simel_mhcil_nas_mirror_from_minio.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,15 @@ def get_random_moll():
"-c",
(
'echo "Checking connectivity with nas volume..."'
' && cd "$MIRROR_ORIG_PATH"'
' && TOTAL_FILES=$(ls -q1 "$MIRROR_ORIG_PATH" | wc -l)'
' && echo "Total files found: $TOTAL_FILES"' # noqa
' && echo "Waiting 5 seconds before start mirroring..."'
" && sleep 5"
' && echo "cd into $MIRROR_ORIG_PATH"'
' && cd "$MIRROR_ORIG_PATH"'
' && echo "Setting up minio client..."'
' && mc alias set "$MINIO_ALIAS" "$MINIO_HOST" "$MINIO_ACCESS_KEY" "$MINIO_SECRET_KEY"' # noqa
' && echo "Mirroring $MIRROR_ORIG_PATH to $MIRROR_DEST_PATH..."'
' && mc mirror "$MIRROR_ORIG_PATH" "$MIRROR_DEST_PATH"'
),
]
Expand Down

0 comments on commit 1bdaed9

Please sign in to comment.