#!/bin/bash function intr() { echo Halting exit } trap intr SIGINT echo Starting builder polling... # polls a redis queue for jobs, starts the builder when it's got some while true do SNAPSHOT_URI=$(redis-cli -h redis LPOP snapshots) [[ -n "$SNAPSHOT_URI" ]] && ./godot-export.sh "$SNAPSHOT_URI" sleep 1 done