Skip to content

Commit

Permalink
server: fix cluster dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
koush committed Dec 10, 2024
1 parent 02cde63 commit ac882c7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
9 changes: 6 additions & 3 deletions server/src/plugin/cluster.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
import type { ClusterManager } from "@scrypted/types";
import type { ClusterManager, ClusterWorker } from "@scrypted/types";
import type { PluginAPI } from "./plugin-api";
import type { ClusterForkService } from "../services/cluster-fork";

export interface ClusterForkServiceInterface {
getClusterWorkers(): Promise<Record<string, ClusterWorker>>;
}

export class ClusterManagerImpl implements ClusterManager {
private clusterServicePromise: Promise<ClusterForkService>;
private clusterServicePromise: Promise<ClusterForkServiceInterface>;

constructor(public clusterMode: undefined | 'client' | 'server', private api: PluginAPI, private clusterWorkerId: string) {
}
Expand Down
2 changes: 1 addition & 1 deletion server/src/plugin/plugin-remote.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ export function attachPluginRemote(peer: RpcPeer, options?: PluginRemoteAttachOp
deviceManager,
endpointManager,
mediaManager,
clusterManager: undefined,
clusterManager,
log,
pluginHostAPI: api,
pluginRemoteAPI: undefined,
Expand Down
2 changes: 1 addition & 1 deletion server/src/state.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { EventDetails, EventListenerOptions, EventListenerRegister, Refresh, ScryptedInterface, ScryptedInterfaceProperty, ScryptedNativeId, SystemDeviceState } from "@scrypted/types";
import { EventDetails, EventListenerOptions, EventListenerRegister, Refresh, ScryptedInterface, ScryptedInterfaceProperty, SystemDeviceState } from "@scrypted/types";
import throttle from 'lodash/throttle';
import { PluginDevice } from "./db-types";
import { EventListenerRegisterImpl, EventRegistry, getMixinEventName } from "./event-registry";
Expand Down

0 comments on commit ac882c7

Please sign in to comment.