← back to Chief Of Operations

supervisor_loop.sh

11 lines

#!/usr/bin/env bash
set -u
cd "$(dirname "$0")"
INTERVAL="${CHIEF_OPS_INTERVAL:-60}"
while true; do
  ./chief_ops.py watch-exo >> state/supervisor.log 2>&1 || true
  ./chief_ops.py claim >> state/supervisor.log 2>&1 || true
  ./chief_ops.py queue --write >> state/supervisor.log 2>&1 || true
  sleep "$INTERVAL"
done