mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-30 22:34:13 +00:00
context_servers: Log errors from detached context server tasks (#16377)
Logged several of the detached tasks that before would silently fail if the context server wasn't in compliance. Release Notes: - N/A
This commit is contained in:
parent
907d76208d
commit
0fdc9d0f05
2 changed files with 5 additions and 3 deletions
|
@ -30,7 +30,9 @@ fn restart_servers(_workspace: &mut Workspace, _action: &Restart, cx: &mut ViewC
|
||||||
let model = ContextServerManager::global(&cx);
|
let model = ContextServerManager::global(&cx);
|
||||||
cx.update_model(&model, |manager, cx| {
|
cx.update_model(&model, |manager, cx| {
|
||||||
for server in manager.servers() {
|
for server in manager.servers() {
|
||||||
manager.restart_server(&server.id, cx).detach();
|
manager
|
||||||
|
.restart_server(&server.id, cx)
|
||||||
|
.detach_and_log_err(cx);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -266,11 +266,11 @@ pub fn init(cx: &mut AppContext) {
|
||||||
|
|
||||||
log::trace!("servers_to_add={:?}", servers_to_add);
|
log::trace!("servers_to_add={:?}", servers_to_add);
|
||||||
for config in servers_to_add {
|
for config in servers_to_add {
|
||||||
manager.add_server(config, cx).detach();
|
manager.add_server(config, cx).detach_and_log_err(cx);
|
||||||
}
|
}
|
||||||
|
|
||||||
for id in servers_to_remove {
|
for id in servers_to_remove {
|
||||||
manager.remove_server(&id, cx).detach();
|
manager.remove_server(&id, cx).detach_and_log_err(cx);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue