fix(cron): Move backoff inside scripts

This commit is contained in:
2026-04-29 08:58:32 +02:00
parent 773504c908
commit 738112f980
6 changed files with 100 additions and 75 deletions
+10 -5
View File
@@ -67,10 +67,10 @@ spec:
failedJobsHistoryLimit: 3
jobTemplate:
spec:
backoffLimit: 10
backoffLimit: 3
template:
spec:
restartPolicy: "OnFailure"
restartPolicy: "Never"
containers:
- name: cronpod
image: juselius/busynix:1.1
@@ -80,9 +80,14 @@ spec:
- -c
- |
nix-env -iA nixpkgs.wget nixpkgs.coreutils nixpkgs.bash
bash /scripts/download.sh
chown -R 5000:5000 /data/hdd/data/norshelf
chmod -R g+w /data/hdd/data/norshelf
if bash /scripts/download.sh; then
chown -R 5000:5000 /data/hdd/data/norshelf
chmod -R g+w /data/hdd/data/norshelf
else
echo "Job failed, sleeping 30 minutes before retry..."
sleep 1800
exit 1
fi
resources: {}
volumeMounts:
- name: data