mirror of
https://github.com/facebook/sapling.git
synced 2024-10-05 14:28:17 +03:00
new admin tool unlink refactoring
Summary: This diff does the follow: * fix linter problems in the pre diffs in this stack * remove the directory creating for error log files, to prevent typos Reviewed By: mitrandir77 Differential Revision: D47228262 fbshipit-source-id: 5422ce01809100732070dafebf6dbda06ce5a872
This commit is contained in:
parent
ba203e428e
commit
9c29375b63
@ -30,6 +30,7 @@ Check we can upload and fetch an arbitrary blob.
|
||||
|
||||
Prepare the input directory for the bulk unlinking tool
|
||||
$ mkdir -p "$TESTTMP/key_inputs"
|
||||
$ mkdir -p "$TESTTMP/unlink_log"
|
||||
|
||||
Prepare the input file that only contains a bad-format key for the bulk unlinking tool
|
||||
$ echo some-invliad-key > "$TESTTMP/key_inputs/bad_format_key_file_0"
|
||||
|
@ -54,9 +54,6 @@ pub struct CommandArgs {
|
||||
}
|
||||
|
||||
fn create_error_log_file(error_log_file_path: String) -> File {
|
||||
let path = std::path::Path::new(&error_log_file_path);
|
||||
let prefix = path.parent().unwrap();
|
||||
std::fs::create_dir_all(prefix).unwrap();
|
||||
let file = OpenOptions::new()
|
||||
.create(true)
|
||||
.write(true)
|
||||
@ -218,7 +215,7 @@ impl BlobstoreBulkUnlinker {
|
||||
"key": key,
|
||||
"message": msg
|
||||
});
|
||||
writeln!(&self.error_log_file, "{}", error_record.to_string());
|
||||
writeln!(&self.error_log_file, "{}", error_record);
|
||||
}
|
||||
|
||||
async fn bulk_unlink_keys_in_file(
|
||||
|
Loading…
Reference in New Issue
Block a user