Skip to content

Commit 23f1b84

Browse files
committed
Updated base directory path
1 parent 2b5bb73 commit 23f1b84

File tree

3 files changed

+4
-12
lines changed

3 files changed

+4
-12
lines changed

src/correlation/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ impl Correlation {
5959
Err(e) => {
6060
error!("Unable to load correlation- {e}");
6161
continue;
62-
},
62+
}
6363
};
6464

6565
correlations.push(correlation);

src/handlers/http/correlation.rs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,7 @@ use bytes::Bytes;
2121
use relative_path::RelativePathBuf;
2222

2323
use crate::{
24-
option::CONFIG,
25-
storage::{CORRELATION_DIRECTORY, PARSEABLE_ROOT_DIRECTORY},
26-
utils::actix::extract_session_key_from_req,
24+
option::CONFIG, storage::CORRELATION_DIRECTORY, utils::actix::extract_session_key_from_req,
2725
};
2826

2927
use crate::correlation::{
@@ -127,11 +125,7 @@ pub async fn delete(req: HttpRequest) -> Result<impl Responder, CorrelationError
127125

128126
// Delete from disk
129127
let store = CONFIG.storage().get_object_store();
130-
let path = RelativePathBuf::from_iter([
131-
PARSEABLE_ROOT_DIRECTORY,
132-
CORRELATION_DIRECTORY,
133-
&correlation.id.to_string(),
134-
]);
128+
let path = RelativePathBuf::from_iter([CORRELATION_DIRECTORY, &correlation.id.to_string()]);
135129
store.delete_object(&path).await?;
136130

137131
// Delete from memory

src/storage/object_storage.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -631,7 +631,6 @@ pub trait ObjectStorage: Send + Sync + 'static {
631631
correlation: &CorrelationConfig,
632632
) -> Result<(), ObjectStorageError> {
633633
let path = RelativePathBuf::from_iter([
634-
PARSEABLE_ROOT_DIRECTORY,
635634
CORRELATION_DIRECTORY,
636635
&format!("{}.json", correlation.id),
637636
]);
@@ -640,8 +639,7 @@ pub trait ObjectStorage: Send + Sync + 'static {
640639
}
641640

642641
async fn get_correlations(&self) -> Result<Vec<Bytes>, CorrelationError> {
643-
let correlation_path =
644-
RelativePathBuf::from_iter([PARSEABLE_ROOT_DIRECTORY, CORRELATION_DIRECTORY]);
642+
let correlation_path = RelativePathBuf::from_iter([CORRELATION_DIRECTORY]);
645643
let correlation_bytes = self
646644
.get_objects(
647645
Some(&correlation_path),

0 commit comments

Comments
 (0)