Open erhant opened 1 month ago
We should add a tokio::select! right at https://github.com/firstbatchxyz/dkn-compute-node/blob/master/src/compute/ollama.rs#L117 so that if the process is terminated while a search is going on, it should cancel that call and return gracefully.
tokio::select!
If Ollama is running on container & is killed anyways, it will terminate with code 500, but we could be more graceful this way.
Our Ollama wrapper should take the token in the struct itself, and this token should be used in setup as well.
setup
We should add a
tokio::select!
right at https://github.com/firstbatchxyz/dkn-compute-node/blob/master/src/compute/ollama.rs#L117 so that if the process is terminated while a search is going on, it should cancel that call and return gracefully.If Ollama is running on container & is killed anyways, it will terminate with code 500, but we could be more graceful this way.
Our Ollama wrapper should take the token in the struct itself, and this token should be used in
setup
as well.