Add default location for action log archiving

Prevents the logs from being written to the preferred storage, which means they will jump around
This commit is contained in:
Joseph Schorr 2017-07-10 12:37:44 +03:00
parent a3afd37c41
commit fa21e42ffb

View file

@ -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()