yolo_web/scripts/job.sh

20 lines
302 B
Bash
Raw Normal View History

#!/bin/bash
set -e
if [ -f .env ]; then
source .env
fi
if [ -z ${YOLO_WEB_URL} ]; then
YOLO_WEB_URL=http://localhost:3333
fi
JOB_JSON=$(curl -s "${YOLO_WEB_URL}/job")
JOB=$(echo $JOB_JSON | jq -r '.[0]')
if [[ "${JOB}" != "null" ]]; then
bash ./scripts/claim.sh "${JOB}"
else
echo "No jobs"
fi