Page MenuHomePhorge

D5006.1767095691.diff
No OneTemporary

Size
1 KB
Referenced Files
None
Subscribers
None

D5006.1767095691.diff

diff --git a/services/backup/blob_client/src/put_client.rs b/services/backup/blob_client/src/put_client.rs
--- a/services/backup/blob_client/src/put_client.rs
+++ b/services/backup/blob_client/src/put_client.rs
@@ -32,6 +32,35 @@
Arc::new(Mutex::new(Vec::new()));
}
+fn is_initialized() -> bool {
+ match CLIENT.lock() {
+ Ok(client) => client.is_some(),
+ _ => {
+ report_error("couldn't access client".to_string());
+ false
+ }
+ }
+}
+
+fn report_error(message: String) {
+ println!("[RUST] [put] Error: {}", message);
+ if let Ok(mut error_messages) = ERROR_MESSAGES.lock() {
+ error_messages.push(message);
+ return;
+ }
+ error!("could not access error messages");
+}
+
+fn check_error() -> Result<(), String> {
+ if let Ok(errors) = ERROR_MESSAGES.lock() {
+ return match errors.is_empty() {
+ true => Ok(()),
+ false => Err(errors.join("\n")),
+ };
+ }
+ Err("could not access error messages".to_string())
+}
+
pub fn put_client_initialize_cxx() -> Result<(), String> {
unimplemented!();
}

File Metadata

Mime Type
text/plain
Expires
Tue, Dec 30, 11:54 AM (20 h, 51 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5867123
Default Alt Text
D5006.1767095691.diff (1 KB)

Event Timeline