Skip to content

Commit

Permalink
Start from most recently processed version by querying `processor_sta…
Browse files Browse the repository at this point in the history
…tus`
  • Loading branch information
matt committed Aug 20, 2024
1 parent 0e75001 commit 26b394e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion rust/start.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
#!/bin/bash

STARTING_VERSION=$(psql -d "$DATABASE_URL" -t -c "SELECT last_success_version FROM processor_status;" 2>/dev/null | tr -d '[:space:]')
if [ -z "$STARTING_VERSION" ]; then
STARTING_VERSION=0
fi
export STARTING_VERSION

echo "health_check_port: 8084
server_config:
processor_config:
Expand All @@ -15,4 +21,4 @@ server_config:
transaction_filter:
focus_user_transactions: true" > /app/config.yaml

/usr/local/bin/processor -c /app/config.yaml
/usr/local/bin/processor --config-path /app/config.yaml

0 comments on commit 26b394e

Please sign in to comment.