refactoring, fixes

Signed-off-by: Roman <ixrock@gmail.com>
This commit is contained in:
Roman committed 2020-07-21 16:01:20 +03:00
1 parent a40a9fec0e
commit 13c29a7fed
8 files changed
+58 -60

No files matched your search

+3 -7
View File
@@ -3,14 +3,10 @@ import { ClusterId, clusterStore } from "./cluster-store";
import { tracker } from "./tracker";
export const clusterIpc = {
refresh: createIpcChannel({
channel: "cluster:refresh",
activate: createIpcChannel({
channel: "cluster:activate",
handle: async (clusterId: ClusterId = clusterStore.activeClusterId) => {
const cluster = clusterStore.getById(clusterId);
if (cluster) {
await cluster.refreshStatus();
return cluster.pushState();
}
return clusterStore.getById(clusterId)?.activate();
},
}),