Skip to content

Commit

Permalink
implement map purging
Browse files Browse the repository at this point in the history
  • Loading branch information
varex83 committed Oct 18, 2023
1 parent d55e06e commit fd0f36d
Show file tree
Hide file tree
Showing 4 changed files with 261 additions and 4 deletions.
146 changes: 146 additions & 0 deletions api/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,5 @@ crossbeam-queue = "0.3.8"
crossbeam-skiplist = "0.1.1"
fmt = "0.1.0"
yansi = "0.5.1"
thiserror = "1.0.49"
thiserror = "1.0.49"
chrono = "0.4.31"
2 changes: 2 additions & 0 deletions api/src/utils/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ pub const TEMP_DIR: &str = concat!(env!("CARGO_MANIFEST_DIR"), "/", "temp/");

pub const DEFAULT_CAIRO_VERSION: &str = "v2.2.0";

pub const DURATION_TO_PURGE: u64 = 5; // 5 seconds

pub fn get_file_ext(file_path: &str) -> String {
match file_path.split('.').last() {
Some(ext) => ext.to_string(),
Expand Down
Loading

0 comments on commit fd0f36d

Please sign in to comment.