From a38a6e8d4ff7a5a2a531f3268bf47544b1f5f5c3 Mon Sep 17 00:00:00 2001 From: xsanm Date: Wed, 5 Feb 2025 15:53:04 +0100 Subject: [PATCH] [native_rust_library] avoid triggering backup upload before cleanup Summary: I discovered this when testing this for wallet users and looking into logs. We might want to start uploading in the middle of the cleanup process, with this easy change we'll wait for deleting already uploaded files first. Test Plan: Check logs that there is now upload until files are deleted. Reviewers: bartek, tomek Reviewed By: tomek Subscribers: ashoat Differential Revision: https://phab.comm.dev/D14294 --- native/native_rust_library/src/backup/upload_handler.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/native/native_rust_library/src/backup/upload_handler.rs b/native/native_rust_library/src/backup/upload_handler.rs index c02c5f50fc..65d1275ef5 100644 --- a/native/native_rust_library/src/backup/upload_handler.rs +++ b/native/native_rust_library/src/backup/upload_handler.rs @@ -247,8 +247,8 @@ pub mod compaction { .await .map_err(|e| e.to_string()); + cleanup_files(backup_id.clone()).await; compaction_upload_promises::resolve(&backup_id, result); - tokio::spawn(cleanup_files(backup_id)); Ok(()) }