A social knowledge tool for researchers built on ATProto

refactor: improve script cleanup handling for dev environments

Co-authored-by: aider (anthropic/claude-sonnet-4-20250514) <aider@aider.chat>

+16 -2
+8 -1
scripts/dev-feed-worker.sh
··· 3 3 # Source the Redis setup script 4 4 source ./scripts/setup-redis.sh 5 5 6 + # Function to handle cleanup 7 + cleanup_and_exit() { 8 + echo "Cleaning up Redis..." 9 + cleanup_redis 10 + exit 0 11 + } 12 + 6 13 # Trap SIGINT and SIGTERM to cleanup on exit 7 - trap cleanup_redis SIGINT SIGTERM 14 + trap cleanup_and_exit SIGINT SIGTERM 8 15 9 16 # Run the feed worker dev command 10 17 npm run dev:worker:feeds:inner
+8 -1
scripts/dev.sh
··· 3 3 # Source the Postgres setup script 4 4 source ./scripts/setup-postgres.sh 5 5 6 + # Function to handle cleanup 7 + cleanup_and_exit() { 8 + echo "Cleaning up Postgres..." 9 + cleanup_postgres 10 + exit 0 11 + } 12 + 6 13 # Trap SIGINT and SIGTERM to cleanup on exit 7 - trap cleanup_postgres SIGINT SIGTERM 14 + trap cleanup_and_exit SIGINT SIGTERM 8 15 9 16 # Run the dev command 10 17 npm run dev:app:inner