Skip to content

Commit

Permalink
chore: add timer to flyway job (#23)
Browse files Browse the repository at this point in the history
* chore: adding timestamp to logs
  • Loading branch information
mishraomp authored Dec 20, 2024
1 parent f0d2b65 commit a967ad3
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions infrastructure/api/ecs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,15 @@ resource "aws_ecs_task_definition" "flyway_task" {
--query 'tasks[0].taskArn' \
--output text)
echo "Flyway task started with ARN: $task_arn at $(date)."
echo "Waiting for Flyway task to complete..."
aws ecs wait tasks-stopped --cluster ${aws_ecs_cluster.ecs_cluster.id} --tasks $task_arn
echo "Flyway task completed, at $(date)."
task_status=$(aws ecs describe-tasks --cluster ${aws_ecs_cluster.ecs_cluster.id} --tasks $task_arn --query 'tasks[0].lastStatus' --output text)
echo "Flyway task status: $task_status at $(date)."
EOF
}
}
Expand Down

0 comments on commit a967ad3

Please sign in to comment.