chore: import MCTF services
- Added all seven issued service trees without omissions. - Preserved the supplied runtime configuration, binaries, and assets.
This commit is contained in:
commit
13f936bee9
1222 files changed
+21280
No files matched your search
Executable
+16
@@ -0,0 +1,16 @@
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
|
||||
: "${PGHOST:=postgres}"
|
||||
: "${PGUSER:=postgres}"
|
||||
: "${PGDATABASE:=delamain}"
|
||||
: "${PGPASSWORD:=postgres}"
|
||||
: "${CLEAN_OLDER_THAN:=6 minutes}"
|
||||
: "${CLEAN_EVERY:=60}"
|
||||
export PGHOST PGUSER PGDATABASE PGPASSWORD
|
||||
|
||||
while true; do
|
||||
sleep "$CLEAN_EVERY"
|
||||
psql -c "DELETE FROM trips WHERE created_at < now() - interval '${CLEAN_OLDER_THAN}'"
|
||||
psql -c "DELETE FROM users WHERE created_at < now() - interval '${CLEAN_OLDER_THAN}'"
|
||||
done
|
||||
Reference in new issue
Block a user