Skip to content

Commit

Permalink
fix: remove debug metadata and config service name
Browse files Browse the repository at this point in the history
  • Loading branch information
charly-bg committed Nov 13, 2024
1 parent e9bce1b commit 4941409
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions indexer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,10 @@ echo "Generated user: $NEW_DB_USER"
# Set PGPASSWORD to handle password prompt
export PGPASSWORD=$DB_PASSWORD

# DEBUG
METADATA=$(curl -s "$ECS_CONTAINER_METADATA_URI_V4/task")
echo "Metadata retrieved: $METADATA"

# Fetch metadata and extract service name in one command
SERVICE_NAME=$(aws ecs describe-tasks \
--cluster "$(curl -s http://169.254.170.2/v4/task | jq -r '.Cluster')" \
--tasks "$(curl -s http://169.254.170.2/v4/task | jq -r '.TaskARN' | awk -F'/' '{print $NF}')" \
--cluster "$(curl -s $ECS_CONTAINER_METADATA_URI_V4/task | jq -r '.Cluster')" \
--tasks "$(curl -s $ECS_CONTAINER_METADATA_URI_V4/task | jq -r '.TaskARN' | awk -F'/' '{print $NF}')" \
--query 'tasks[0].group' --output text | sed 's|service:||')

echo "Service Name: $SERVICE_NAME"
Expand Down

0 comments on commit 4941409

Please sign in to comment.