Skip to content

Commit

Permalink
fix: exit properly if db-sync stops
Browse files Browse the repository at this point in the history
  • Loading branch information
nrdxp committed Mar 1, 2023
1 parent a6fa3a2 commit c90a6f3
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions nix/cardano/entrypoints.nix
Original file line number Diff line number Diff line change
Expand Up @@ -387,10 +387,18 @@ in {
while true
do
i+=1
if ! jobs %%; then
echo "exiting: db-sync failed" >&2
status=$(wait "$pid_to_signal")
exit "$status"
fi
# renew credentials lease every 2 minutes
if [[ $(( i % 8 )) -eq 0 ]]; then
renew_lease
fi
sleep 15
echo "Service discovery heartbeat - every 15 seconds" >&2
original_addr="$PSQL_ADDR0"
Expand Down

0 comments on commit c90a6f3

Please sign in to comment.