mirror of
https://github.com/koush/scrypted.git
synced 2026-08-09 23:00:38 +01:00
server: fix node cluster ping
This commit is contained in:
2
server/.vscode/launch.json
vendored
2
server/.vscode/launch.json
vendored
@@ -94,7 +94,7 @@
|
||||
"${workspaceFolder}/**/*.js"
|
||||
],
|
||||
"env": {
|
||||
"SCRYPTED_CLUSTER_LABELS": "compute",
|
||||
// "SCRYPTED_CLUSTER_LABELS": "compute",
|
||||
"SCRYPTED_CLUSTER_MODE": "client",
|
||||
"SCRYPTED_CLUSTER_SERVER": "scrypted-nvr",
|
||||
"SCRYPTED_CLUSTER_SECRET": "swordfish",
|
||||
|
||||
@@ -35,11 +35,13 @@ export function startPluginRemote(mainFilename: string, pluginId: string, peerSe
|
||||
const { initializeCluster, connectRPCObject, mainThreadBrokerRegister, mainThreadPort } = clusterPeerSetup;
|
||||
|
||||
peer.params.initializeCluster = initializeCluster;
|
||||
peer.params.ping = async (time: number) => {
|
||||
return time;
|
||||
};
|
||||
|
||||
let systemManager: SystemManager;
|
||||
let deviceManager: DeviceManagerImpl;
|
||||
let api: PluginAPI;
|
||||
let originalAPI: PluginAPI;
|
||||
|
||||
let pluginsPromise: Promise<any>;
|
||||
function getPlugins() {
|
||||
@@ -82,7 +84,6 @@ export function startPluginRemote(mainFilename: string, pluginId: string, peerSe
|
||||
}
|
||||
}
|
||||
|
||||
originalAPI = _api;
|
||||
api = new PluginForkableAPI(_api);
|
||||
peer.selfName = pluginId;
|
||||
return api;
|
||||
@@ -195,10 +196,6 @@ export function startPluginRemote(mainFilename: string, pluginId: string, peerSe
|
||||
|
||||
await installOptionalDependencies(getPluginConsole(), packageJson);
|
||||
|
||||
peer.params.ping = async (time: number) => {
|
||||
return time;
|
||||
};
|
||||
|
||||
const main = pluginReader(mainNodejs);
|
||||
const script = main.toString();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user