Skip to content

Commit

Permalink
Check for empty lines in silo_import_job
Browse files Browse the repository at this point in the history
  • Loading branch information
anna-parker committed Sep 11, 2024
1 parent f073e72 commit 2e7e765
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions kubernetes/loculus/silo_import_job.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,13 @@ download_data() {
exit_code=$?
set -e

c=`tail -c 2 $new_input_data`
if [ "$c" != "" ]; then
echo "No 2 newlines at end of $new_input_data, instead $c, stream not completed, cleaning up and exiting"
rm -rf "$new_input_data_dir"
exit $exit_code
fi

if [ $exit_code -ne 0 ]; then
echo "Curl command failed with exit code $exit_code, cleaning up and exiting."
rm -rf "$new_input_data_dir"
Expand Down

0 comments on commit 2e7e765

Please sign in to comment.