Add worker name + nix

This commit is contained in:
Rory&
2026-07-27 00:33:12 +02:00
parent f20dde8913
commit 41325f94c2
2 changed files with 2 additions and 1 deletions
+1
View File
@@ -39,6 +39,7 @@ in
# things we set by default...
EVENT_TRANSMISSION = "unix";
EVENT_SOCKET_PATH = "/run/spacebar/";
WORKER_NAME = "sb-gateway-${port}";
}
// cfg.extraEnvironment
// {
+1 -1
View File
@@ -67,7 +67,7 @@ import { check } from "./instanceOf";
export async function onIdentify(this: WebSocket, data: Payload) {
const totalSw = Stopwatch.startNew();
const taskSw = Stopwatch.startNew();
const gatewayShardName = `sb-gateway`;
const gatewayShardName = process.env.WORKER_NAME ?? `sb-gateway`;
if (this.user_id) {
// we've already identified