mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-03-27 20:01:10 +01:00
Various tweaks
This commit is contained in:
@@ -189,7 +189,7 @@ pub async fn track_event(
|
||||
|
||||
// Disable analytics actual sending in dev
|
||||
if is_dev() {
|
||||
debug!("track: {}", event);
|
||||
debug!("track: {} {}", event, attributes_json);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -70,6 +70,10 @@ impl YaakNotifier {
|
||||
("launches", num_launches.to_string()),
|
||||
]);
|
||||
let resp = req.send().await.map_err(|e| e.to_string())?;
|
||||
if resp.status().to_string() != "200" {
|
||||
return Ok(());
|
||||
}
|
||||
|
||||
let notification = resp
|
||||
.json::<YaakNotification>()
|
||||
.await
|
||||
|
||||
@@ -55,9 +55,9 @@ pub async fn node_start<R: Runtime>(app: &AppHandle<R>, temp_dir: &PathBuf) -> S
|
||||
// read events such as stdout
|
||||
while let Some(event) = rx.recv().await {
|
||||
if let CommandEvent::Stdout(line) = event {
|
||||
println!("{}", String::from_utf8_lossy(line.as_slice()));
|
||||
print!("{}", String::from_utf8_lossy(line.as_slice()));
|
||||
} else if let CommandEvent::Stderr(line) = event {
|
||||
println!("{}", String::from_utf8_lossy(line.as_slice()));
|
||||
print!("{}", String::from_utf8_lossy(line.as_slice()));
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user