Skip to content

Commit

Permalink
Merge pull request #4 from edgenai/fix/issue1
Browse files Browse the repository at this point in the history
Fix/issue1
  • Loading branch information
toschoo authored Jan 31, 2024
2 parents a9c9758 + a5097a9 commit 41023e5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 0 additions & 1 deletion crates/edgen_rt_llama_cpp/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@ impl LLMEndpoint for LlamaCppEndpoint {
impl Default for LlamaCppEndpoint {
fn default() -> Self {
let models: Arc<DashMap<String, UnloadingModel>> = Default::default();

let models_clone = models.clone();
let cleanup_thread = spawn(async move {
let mut interval = interval(cleanup_interval());
Expand Down
2 changes: 2 additions & 0 deletions crates/edgen_server/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,8 @@ async fn run_server(args: &cli::Serve) -> bool {
let flag_clone = reset_flag.clone();

let _callback_handle = SETTINGS.read().await.add_change_callback(move || {
let rt = tokio::runtime::Runtime::new().unwrap();
let _guard = rt.enter();
flag_clone.store(true, Ordering::SeqCst);
reset_channels.clear();
block_on(crate::llm::reset_environment());
Expand Down

0 comments on commit 41023e5

Please sign in to comment.