2023-06-24 00:22:05 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
if [ -f .env ]; then
|
|
|
|
source .env
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -z ${1} ]; then
|
|
|
|
echo "Please provide a job"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
JOB="${1}"
|
|
|
|
|
|
|
|
JSON=$(curl -s -X POST "${YOLO_WEB_URL}/job/claim/${JOB}")
|
|
|
|
|
|
|
|
if [[ "${JSON}" != *"{"* ]]; then
|
|
|
|
echo ERROR
|
|
|
|
echo "${JSON}"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2023-06-30 14:45:07 +00:00
|
|
|
if [ -f ./scripts/claim_mail.sh ]; then
|
|
|
|
bash ./scripts/claim_mail.sh "${JSON}"
|
|
|
|
fi
|
|
|
|
|
|
|
|
bash ./scripts/train.sh "${JSON}"
|