Skip to content

Commit

Permalink
Use consistent output message format across scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
luca-vari committed Nov 29, 2024
1 parent b393481 commit 81eb7aa
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions app/scripts/tasks/staging-restore.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,21 @@ aws s3 cp ${S3_BUCKET}/${LATEST_BACKUP} - | gunzip | \
echo -e "\nRunning migrations"
./manage.py migrate

echo -e "\nSetting all Slack messages to send to test alerts channel."
echo -e "\nSetting all Slack messages to send to test alerts channel"
SHELL_CMD="space=chr(32);\
c=SlackChannel.objects.get(name=f'Test{space}Alerts');\
SlackMessage.objects.all().update(channel=c);\
SlackUser.objects.all().delete()"
./manage.py shell_plus --quiet-load -c "$SHELL_CMD"

echo -e "\nDeleting all Scheduled tasks."
echo -e "\nDeleting all Scheduled tasks"
SHELL_CMD="Success.objects.all().delete();\
Failure.objects.all().delete();\
Schedule.objects.all().delete();\
OrmQ.objects.all().delete()"
./manage.py shell_plus --quiet-load -c "$SHELL_CMD"

echo -e "\nObfuscating all personally identifiable information."
echo -e "\nObfuscating all personally identifiable information"
./manage.py obfuscate_data

echo -e "\nDatabase restore finished."
echo -e "\nDatabase restore finished"

0 comments on commit 81eb7aa

Please sign in to comment.