Skip to content

Commit

Permalink
small log fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
erhant committed Dec 4, 2024
1 parent 667299f commit ecea7f3
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 9 deletions.
3 changes: 1 addition & 2 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ GEMINI_API_KEY=
OPENROUTER_API_KEY=

## Ollama (if used, optional) ##
# do not change this, it is used by Docker
OLLAMA_HOST=http://host.docker.internal
OLLAMA_HOST=http://localhost
# you can change the port if you would like
OLLAMA_PORT=11434
# if "true", automatically pull models from Ollama
Expand Down
1 change: 0 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ endif
###############################################################################
.PHONY: launch # | Run with INFO logs in release mode
launch:
RUST_LOG=none,dkn_compute=info,dkn_workflows=info,dkn_p2p=info \
cargo run --release --bin dkn-compute

.PHONY: run # | Run with INFO logs
Expand Down
9 changes: 6 additions & 3 deletions compute/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@ async fn main() -> Result<()> {
.filter_module("dkn_workflows", log::LevelFilter::Info)
.parse_default_env() // reads RUST_LOG variable
.init();
if let Err(e) = dotenv_result {
log::warn!("could not load .env file: {}", e);
}

log::info!(
r#"
Expand All @@ -32,6 +29,12 @@ async fn main() -> Result<()> {
"#
);

// log about env usage
match dotenv_result {
Ok(path) => log::info!("Loaded .env file at: {}", path.display()),
Err(e) => log::warn!("Could not load .env file: {}", e),
}

// task tracker for multiple threads
let task_tracker = TaskTracker::new();
let cancellation = CancellationToken::new();
Expand Down
4 changes: 2 additions & 2 deletions p2p/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ use super::DriaP2PCommander;

/// Peer-to-peer client for Dria Knowledge Network.
pub struct DriaP2PClient {
/// `Swarm` instance, everything is accesses through this one.
/// `Swarm` instance, everything p2p-related are accessed through this instace.
swarm: Swarm<DriaBehaviour>,
/// Dria protocol, used for identifying the client.
protocol: DriaP2PProtocol,
/// Message sender / transmitter.
/// Gossipsub message sender.
msg_tx: mpsc::Sender<(PeerId, MessageId, Message)>,
/// Command receiver.
cmd_rx: mpsc::Receiver<DriaP2PCommand>,
Expand Down
2 changes: 1 addition & 1 deletion workflows/src/apis/jina.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ impl JinaConfig {
log::info!("Jina API key not found, skipping");
return Ok(());
};
log::info!("Jina API key found {api_key}, checking service");
log::info!("Jina API key found, checking service");

// make a dummy request to "example.com"
let client = Client::new();
Expand Down

0 comments on commit ecea7f3

Please sign in to comment.