mirror of
https://github.com/openclaw/openclaw.git
synced 2026-06-22 07:48:12 +00:00
refactor(discord): remove unused thread binding helpers
This commit is contained in:
@@ -11,8 +11,6 @@ import {
|
||||
} from "openclaw/plugin-sdk/string-coerce-runtime";
|
||||
import { getDiscordRuntime } from "../runtime.js";
|
||||
import {
|
||||
DEFAULT_THREAD_BINDING_IDLE_TIMEOUT_MS,
|
||||
DEFAULT_THREAD_BINDING_MAX_AGE_MS,
|
||||
RECENT_UNBOUND_WEBHOOK_ECHO_WINDOW_MS,
|
||||
type PersistedThreadBindingRecord,
|
||||
type ThreadBindingManager,
|
||||
@@ -573,13 +571,6 @@ export function resolveBindingIdsForSession(params: {
|
||||
return out;
|
||||
}
|
||||
|
||||
export function resolveDefaultThreadBindingDurations() {
|
||||
return {
|
||||
defaultIdleTimeoutMs: DEFAULT_THREAD_BINDING_IDLE_TIMEOUT_MS,
|
||||
defaultMaxAgeMs: DEFAULT_THREAD_BINDING_MAX_AGE_MS,
|
||||
};
|
||||
}
|
||||
|
||||
export function resetThreadBindingsForTests() {
|
||||
for (const manager of MANAGERS_BY_ACCOUNT_ID.values()) {
|
||||
manager.stop();
|
||||
|
||||
@@ -76,7 +76,6 @@ export type ThreadBindingManager = {
|
||||
stop: () => void;
|
||||
};
|
||||
|
||||
export const THREAD_BINDINGS_VERSION = 1 as const;
|
||||
export const THREAD_BINDINGS_SWEEP_INTERVAL_MS = 120_000;
|
||||
export const DEFAULT_THREAD_BINDING_IDLE_TIMEOUT_MS = 24 * 60 * 60 * 1000; // 24h
|
||||
export const DEFAULT_THREAD_BINDING_MAX_AGE_MS = 0; // disabled
|
||||
|
||||
Reference in New Issue
Block a user