maintenance: fix image sweeper script indentation
This commit is contained in:
parent
99a6b4c054
commit
b7e5a04265
@ -17,7 +17,11 @@ data:
|
|||||||
THRESHOLD_DAYS=3
|
THRESHOLD_DAYS=3
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cutoff=$(date -d "${THRESHOLD_DAYS} days ago" +%s 2>/dev/null || date -v -"${THRESHOLD_DAYS}"d +%s)
|
cutoff=$(python3 - <<'PY'
|
||||||
|
import time, os
|
||||||
|
print(int(time.time()) - int(os.environ.get("THRESHOLD_DAYS", "14")) * 86400)
|
||||||
|
PY
|
||||||
|
)
|
||||||
|
|
||||||
RUNNING=$(chroot /host /bin/sh -c "crictl ps -a --quiet 2>/dev/null" | tr -s ' ' '\n' | sort -u | tr '\n' ' ')
|
RUNNING=$(chroot /host /bin/sh -c "crictl ps -a --quiet 2>/dev/null" | tr -s ' ' '\n' | sort -u | tr '\n' ' ')
|
||||||
IMAGES_JSON=$(chroot /host /bin/sh -c "crictl images -o json 2>/dev/null" || echo '{}')
|
IMAGES_JSON=$(chroot /host /bin/sh -c "crictl images -o json 2>/dev/null" || echo '{}')
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user