From a7fdb2227a06f4719aeac2b367aa046aa913a27a Mon Sep 17 00:00:00 2001 From: Marco Pedone Date: Mon, 18 Aug 2025 09:54:38 +0200 Subject: [PATCH] Add scripts for cleaning expired storage and updating jobs --- apps/backend/scripts/clean_expired.sh | 10 ++++++++++ apps/backend/scripts/update.sh | 10 ++++++++++ 2 files changed, 20 insertions(+) create mode 100644 apps/backend/scripts/clean_expired.sh create mode 100644 apps/backend/scripts/update.sh diff --git a/apps/backend/scripts/clean_expired.sh b/apps/backend/scripts/clean_expired.sh new file mode 100644 index 0000000..fae3559 --- /dev/null +++ b/apps/backend/scripts/clean_expired.sh @@ -0,0 +1,10 @@ +#!/bin/bash +set -e # Exit on any error + +echo "Starting expired storage cleanup..." +if curl -f --connect-timeout 30 --max-time 300 "http://localhost:1323/storage/remove-expired"; then + echo "Expired storage cleanup completed successfully" +else + echo "Failed to clean expired storage" >&2 + exit 1 +fi \ No newline at end of file diff --git a/apps/backend/scripts/update.sh b/apps/backend/scripts/update.sh new file mode 100644 index 0000000..0afcace --- /dev/null +++ b/apps/backend/scripts/update.sh @@ -0,0 +1,10 @@ +#!/bin/bash +set -e # Exit on any error + +echo "Starting Update job..." +if curl -f --connect-timeout 30 --max-time 300 "http://localhost:1323/update"; then + echo "Update job completed successfully" +else + echo "Failed to Update" >&2 + exit 1 +fi \ No newline at end of file