Skip to content

Commit

Permalink
Update cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
kx1t committed Jul 1, 2024
1 parent f632e02 commit 6805ab5
Showing 1 changed file with 11 additions and 13 deletions.
24 changes: 11 additions & 13 deletions rootfs/etc/s6-overlay/scripts/cleanup
Original file line number Diff line number Diff line change
Expand Up @@ -23,23 +23,21 @@ source /scripts/common

renice -n 20 -p $$ >/dev/null 2>/dev/null

CLEANUP_EVERY=1800 # 30 minutes in seconds
PHOTOS_RETENTION=20160 # 2 weeks in minutes
SCREENSHOT_RETENTION=60 # 1 hour in minutes
#LOCKFILE_RETENTION=15 # 15 minutes
MMSI_RETENTION=1209600 # 2 weeks in seconds
COUNTRY_BKUP_RETENTION=20160 # 2 weeks in minutes
DISCTMPL_BKUP_RETENTION=20160 # 2 weeks in minutes
SHIPSTATUS_BKUP_RETENTION=20160 # 2 weeks in minutes
SHIPTYPE_BKUP_RETENTION=20160 # 2 weeks in minutes
VESSELDB_BKUP_RETENTION=20160 # 2 weeks in minutes
MASTODON_CLEANUP_EVERY=43200 # 12 hours in seconds
CLEANUP_EVERY="${CLEANUP_EVER:-1800}" # 30 minutes in seconds
PHOTOS_RETENTION="${PHOTOS_RETENTION:-20160}" # 2 weeks in minutes
SCREENSHOT_RETENTION="${SCREENSHOT_RETENTION:-60}" # 1 hour in minutes
MMSI_RETENTION="${MMSI_RETENTION:-1209600}" # 2 weeks in seconds
COUNTRY_BKUP_RETENTION="${VESSELDB_BKUP_RETENTION:-20160}" # 2 weeks in minutes
DISCTMPL_BKUP_RETENTION="${DISCTMPL_BKUP_RETENTION:-20160}" # 2 weeks in minutes
SHIPSTATUS_BKUP_RETENTION="${SHIPSTATUS_BKUP_RETENTION:-20160}" # 2 weeks in minutes
SHIPTYPE_BKUP_RETENTION="${SHIPTYPE_BKUP_RETENTION:-20160}" # 2 weeks in minutes
VESSELDB_BKUP_RETENTION="${VESSELDB_BKUP_RETENTION:-20160}" # 2 weeks in minutes
MASTODON_CLEANUP_EVERY="${MASTODON_CLEANUP_EVERY:-43200}" # 12 hours in seconds
DBLOCK_MAXWAIT="${DBLOCK_MAXWAIT:-600}" # don't wait more than 600 secs for the dblock to be removed

VESSELDBFILE="${VESSELDBFILE:-/data/vessel.db}"
VESSELDBLOCK="${VESSELDBLOCK:-/run/vesseldb.lock}"

DBLOCK_MAXWAIT=600 # don't wait more than 600 secs for the dblock to be removed

[[ ! -f /run/.last_mastodon_cleanup ]] && date +%s > /run/.last_mastodon_cleanup || true

"${s6wrap[@]}" echo "[INFO] Starting Cleanup"
Expand Down

0 comments on commit 6805ab5

Please sign in to comment.