fix(cron): Move backoff inside scripts
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user