mirror of
https://github.com/koush/scrypted.git
synced 2026-03-03 01:32:09 +00:00
server: fixup address, make it available on cluster manager
This commit is contained in:
@@ -15,6 +15,10 @@ export class ClusterManagerImpl implements ClusterManager {
|
||||
return this.clusterWorkerId;
|
||||
}
|
||||
|
||||
getClusterAddress(): string {
|
||||
return process.env.SCRYPTED_CLUSTER_ADDRESS;
|
||||
}
|
||||
|
||||
getClusterMode(): 'server' | 'client' | undefined {
|
||||
return this.clusterMode;
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ import type { RuntimeWorkerOptions } from "../plugin/runtime/runtime-worker";
|
||||
import { RpcPeer } from "../rpc";
|
||||
import type { ScryptedRuntime } from "../runtime";
|
||||
import type { ClusterForkOptions, ClusterForkParam, ClusterForkResultInterface, PeerLiveness, RunningClusterWorker } from "../scrypted-cluster-main";
|
||||
import { removeIPv4EmbeddedIPv6 } from "../ip";
|
||||
|
||||
class WrappedForkResult implements ClusterForkResultInterface {
|
||||
[RpcPeer.PROPERTY_PROXY_PROPERTIES] = {
|
||||
@@ -109,7 +110,7 @@ export class ClusterForkService {
|
||||
labels: worker.labels,
|
||||
forks: [...worker.forks] as ClusterFork[],
|
||||
mode: worker.mode,
|
||||
address: worker.address,
|
||||
address: removeIPv4EmbeddedIPv6(worker.address),
|
||||
};
|
||||
}
|
||||
return ret;
|
||||
|
||||
Reference in New Issue
Block a user