diff --git a/workers/logrotateworker.py b/workers/logrotateworker.py index 54ff0f25d..06e93d23d 100644 --- a/workers/logrotateworker.py +++ b/workers/logrotateworker.py @@ -53,7 +53,13 @@ class LogRotateWorker(Worker): return def _perform_archiving(self, cutoff_id): - log_archive = DelegateUserfiles(app, storage, SAVE_LOCATION, SAVE_PATH) + save_location = SAVE_LOCATION + if not save_location: + # Pick the *same* save location for all instances. This is a fallback if + # a location was not configured. + save_location = storage.locations[0] + + log_archive = DelegateUserfiles(app, storage, save_location, SAVE_PATH) with UseThenDisconnect(app.config): start_id = get_stale_logs_start_id()