Skip to content

Commit

Permalink
fix pub sub functions deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
BrianP8701 committed Sep 11, 2024
1 parent 24bad3f commit 3b9f865
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions infra/deploy/functions/deploy-functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,25 +17,3 @@ wait
sh "$DIR/deploy-functions-connect-cloudsql.sh" clerk-event-http $REGION $CLOUDSQL_INSTANCE &
sh "$DIR/deploy-functions-connect-cloudsql.sh" operation-handler $REGION $CLOUDSQL_INSTANCE &
wait

# Add this function to check if a handler should be deployed as a cloud function
should_deploy_as_cloud_function() {
local handler_name=$1
case $handler_name in
WebSocketHandler)
return 1 # Don't deploy as a cloud function
;;
*)
return 0 # Deploy as a cloud function
;;
esac
}

# Modify the deployment loop
for handler in ${HANDLERS[@]}; do
if should_deploy_as_cloud_function $handler; then
deploy_function $handler
else
echo "Skipping deployment of $handler as a cloud function"
fi
done

0 comments on commit 3b9f865

Please sign in to comment.