rt-clean-sessions(8)

πŸ“¦
version 4.4.7 Β· 5 versions
, in ubuntu noble

✨ rt-clean-sessions ✨

okay bestie, so this is a page from the Request Tracker Reference β€” yes the rt-clean-sessions(8) girlies know β€” and it's literally the glow-up your RT sessions have been begging for πŸ’…


🌸 NAME 🌸

rt-clean-sessions β€” clean old and duplicate RT sessions 🧹✨


πŸŽ€ SYNOPSIS πŸŽ€

rt-clean-sessions [--debug] [--older <NUM>[H|D|M|Y]]

rt-clean-sessions
rt-clean-sessions --debug
rt-clean-sessions --older 10D
rt-clean-sessions --debug --older 1M
rt-clean-sessions --older 10D --skip-user

like... look at all those options. main character energy fr fr πŸ’–


πŸ’– DESCRIPTION πŸ’–

okay so here's the tea 🍡 β€” this script cleans RT sessions from the DB or from a dir with sessions data. it leaves in the DB only one session per RT user, plus any sessions that aren't older than what you specified (see the options below, bestie).

and the best part? the script is safe 🫢 because data in the sessions is temporary and can be deleted. no cap. it's giving "spring cleaning but make it harmless" 🌸


✨ OPTIONS ✨

  • --older β€” date interval in the <NUM>[<unit>] format. the default unit is D (days), and H (hour), M (month) and Y (year) are also supported. for example: rt-clean-sessions --older 1M would delete all sessions that are older than 1 month. so iconic of it πŸ’…
  • --skip-user β€” by default only one session per user is left in the DB, so users that have sessions on multiple computers or in different browsers will be logged out 😭. use this option to avoid this. protect the multi-device girlies 🫢
  • --debug β€” turn on debug output πŸ”βœ¨

πŸ“ NOTES πŸ“

so there's functionality similar to this implemented in html/Elements/SetupSessionCookie β€” however (and this is the important part, don't skip it πŸ™ˆ), that does not guarantee that a session will be removed from disk and database soon after the timeout expires.

this script, if run from a cron job, will ensure that the timed out sessions are actually removed from disk. the Mason component just ensures that the old sessions are not reusable before the cron job gets to them. so like... they're a duo, not a replacement, iykyk 🧚

ngl the cron job is the one doing the real work here. respect. πŸ‘‘

that's the whole page, bestie! go forth and clean those sessions πŸ’œ

this has been perl v5.38.2, dated 2023-10-29, and yes it's the rt-clean-sessions(8) page β€” slay, bye! πŸŽ€

πŸ“¦ where this page comes from