MCPcopy Create free account
hub / github.com/Rustixir/darkbird / start

Method start

src/darkbird/wal/page_processor.rs:84–103  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

82
83
84 pub fn start(self) -> Result<(), String> {
85 match self.internal_start() {
86 Ok(_) => Ok(()),
87 Err(Recovery::UnRecoverable(e)) => return Err(e),
88 Err(Recovery::Recoverable(Metadata { original_filename, currepted_filename, mut err })) => {
89 if let Sync::Overwrite = self.sync_name {
90 if let Err(e) = fs::remove_file(&currepted_filename) {
91 err.push_str("__");
92 err.push_str(&e.to_string());
93 }
94 if let Err(e) = fs::rename(original_filename, &currepted_filename) {
95 err.push_str("__");
96 err.push_str(&e.to_string());
97 }
98 }
99
100 return Err(err)
101 }
102 }
103 }
104
105
106 fn internal_start(&self) -> Result<(), Recovery> {

Callers 2

migrationFunction · 0.80
backupFunction · 0.80

Calls 2

internal_startMethod · 0.80
to_stringMethod · 0.45

Tested by

no test coverage detected