Skip to content

Commit

Permalink
add logging messages in stop_service
Browse files Browse the repository at this point in the history
  • Loading branch information
amakropoulos committed Jun 18, 2024
1 parent 15060cf commit fb15798
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions undreamai.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -432,10 +432,12 @@ void LLM::start_service(){

void LLM::stop_service(){
try {
LOG_INFO("shutting down tasks", {});
ctx_server.queue_tasks.terminate();
for(int id_task:ctx_server.queue_results.waiting_task_ids)
ctx_server.send_error(id_task, -1, "shutting down", ERROR_TYPE_INVALID_REQUEST);
if(llama_backend_has_init) llama_backend_free();
LOG_INFO("service stopped", {});
} catch(...) {
handle_exception();
}
Expand Down

0 comments on commit fb15798

Please sign in to comment.