Skip to content

Commit

Permalink
liquid-asset-poller: Reduce interval, keep updates more in sync betwe…
Browse files Browse the repository at this point in the history
…en servers
  • Loading branch information
shesek committed Mar 21, 2020
1 parent 4f515ac commit c895476
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions contrib/runits/liquid-assets-poller.runit
@@ -1,6 +1,8 @@
#!/bin/bash
set -eo pipefail

export TZ=UTC

# Setup a "gitpgp" command to only accept keys from a local keyring file
# https://tribut.de/blog/git-commit-signatures-trusted-keys
if [ ! -f /usr/bin/gitgpg-assets ]; then
Expand Down Expand Up @@ -28,7 +30,9 @@ git checkout master

# Update periodically
while :; do
sleep 900 # 15 minutes
# Update every 3 minutes, but always on every 3rd round minute to keep updates in sync across servers
sleep $((180 - $(date +%s) % 180))

git fetch
git pull --verify-signatures --ff-only
git pull --verify-signatures --ff-only || true
done

0 comments on commit c895476

Please sign in to comment.