SPB Git

spb/autoscholar

Public
307 B · 6 lines shellscript
1#!/bin/bash2# Deletes worker run workspaces older than KEEP_DAYS (default 14). Run on the worker node as asworker or root.3set -euo pipefail4ROOT="${WORKER_ROOT:-/var/autoscholar}/runs"; KEEP_DAYS="${KEEP_DAYS:-14}"5find "$ROOT" -mindepth 1 -maxdepth 1 -type d -mtime +"$KEEP_DAYS" -print -exec rm -rf {} +6
Files · 2f4359ca119e7ede5dc05e5ab87415438b0b84f6
Menu

Theme