···33# Source the Redis setup script
44source ./scripts/setup-redis.sh
5566-# Function to handle cleanup
77-cleanup_and_exit() {
88- echo "Cleaning up Redis..."
99- cleanup_redis
1010- exit 0
1111-}
66+# Only setup cleanup if not running from combined script
77+if [ -z "$COMBINED_SCRIPT" ]; then
88+ # Function to handle cleanup
99+ cleanup_and_exit() {
1010+ echo "Cleaning up Redis..."
1111+ cleanup_redis
1212+ exit 0
1313+ }
12141313-# Trap SIGINT and SIGTERM to cleanup on exit
1414-trap cleanup_and_exit SIGINT SIGTERM
1515+ # Trap SIGINT and SIGTERM to cleanup on exit
1616+ trap cleanup_and_exit SIGINT SIGTERM
1717+fi
15181619# Run the feed worker dev command
1720npm run dev:worker:feeds:inner
18211919-# Cleanup after dev command exits
2020-cleanup_redis
2222+# Only cleanup if not running from combined script
2323+if [ -z "$COMBINED_SCRIPT" ]; then
2424+ cleanup_redis
2525+fi
···33# Source the Postgres setup script
44source ./scripts/setup-postgres.sh
5566-# Function to handle cleanup
77-cleanup_and_exit() {
88- echo "Cleaning up Postgres..."
99- cleanup_postgres
1010- exit 0
1111-}
66+# Only setup cleanup if not running from combined script
77+if [ -z "$COMBINED_SCRIPT" ]; then
88+ # Function to handle cleanup
99+ cleanup_and_exit() {
1010+ echo "Cleaning up Postgres..."
1111+ cleanup_postgres
1212+ exit 0
1313+ }
12141313-# Trap SIGINT and SIGTERM to cleanup on exit
1414-trap cleanup_and_exit SIGINT SIGTERM
1515+ # Trap SIGINT and SIGTERM to cleanup on exit
1616+ trap cleanup_and_exit SIGINT SIGTERM
1717+fi
15181619# Run the dev command
1720npm run dev:app:inner
18211919-# Cleanup after dev command exits
2020-cleanup_postgres
2222+# Only cleanup if not running from combined script
2323+if [ -z "$COMBINED_SCRIPT" ]; then
2424+ cleanup_postgres
2525+fi