From 6a79bea5df243b206fccf8bfe996c7d3818758e7 Mon Sep 17 00:00:00 2001 From: shimon Date: Wed, 16 Nov 2022 16:56:47 +0200 Subject: [PATCH] Deleted functions schedules clean up --- .env | 2 +- src/Appwrite/Platform/Tasks/Maintenance.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.env b/.env index b94fa24f23..6e6f9e6204 100644 --- a/.env +++ b/.env @@ -82,6 +82,7 @@ _APP_MAINTENANCE_RETENTION_CACHE=2592000 _APP_MAINTENANCE_RETENTION_EXECUTION=1209600 _APP_MAINTENANCE_RETENTION_ABUSE=86400 _APP_MAINTENANCE_RETENTION_AUDIT=1209600 +_APP_MAINTENANCE_RETENTION_SCHEDULES=360 _APP_USAGE_TIMESERIES_INTERVAL=2 _APP_USAGE_DATABASE_INTERVAL=15 _APP_USAGE_STATS=enabled @@ -90,4 +91,3 @@ _APP_LOGGING_CONFIG= _APP_REGION=default _APP_DOCKER_HUB_USERNAME= _APP_DOCKER_HUB_PASSWORD= -_APP_MAINTENANCE_RETENTION_SCHEDULES=86400 diff --git a/src/Appwrite/Platform/Tasks/Maintenance.php b/src/Appwrite/Platform/Tasks/Maintenance.php index 7a6085c480..39b5a19992 100644 --- a/src/Appwrite/Platform/Tasks/Maintenance.php +++ b/src/Appwrite/Platform/Tasks/Maintenance.php @@ -135,7 +135,7 @@ class Maintenance extends Action $usageStatsRetention30m = (int) App::getEnv('_APP_MAINTENANCE_RETENTION_USAGE_30M', '129600'); //36 hours $usageStatsRetention1d = (int) App::getEnv('_APP_MAINTENANCE_RETENTION_USAGE_1D', '8640000'); // 100 days $cacheRetention = (int) App::getEnv('_APP_MAINTENANCE_RETENTION_CACHE', '2592000'); // 30 days - $schedulesDeletionRetention = (int) App::getEnv('_APP_MAINTENANCE_RETENTION_SCHEDULES', '86400'); //Todo One day gap??? + $schedulesDeletionRetention = (int) App::getEnv('_APP_MAINTENANCE_RETENTION_SCHEDULES', '360'); // 1 hour Console::loop(function () use ($interval, $executionLogsRetention, $abuseLogsRetention, $auditLogRetention, $usageStatsRetention30m, $usageStatsRetention1d, $cacheRetention, $schedulesDeletionRetention, $dbForConsole) { $time = DateTime::now();