mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 00:20:43 +00:00
fix: make slack socket health event-driven
This commit is contained in:
@@ -99,6 +99,7 @@ function createComputedStatusAdapter() {
|
||||
{ ok: boolean }
|
||||
>({
|
||||
defaultRuntime: createDefaultChannelRuntimeState("default"),
|
||||
skipStaleSocketHealthCheck: true,
|
||||
resolveAccountSnapshot: ({ account, runtime, probe }) => ({
|
||||
accountId: account.accountId,
|
||||
enabled: account.enabled,
|
||||
@@ -118,6 +119,7 @@ function createAsyncStatusAdapter() {
|
||||
{ ok: boolean }
|
||||
>({
|
||||
defaultRuntime: createDefaultChannelRuntimeState("default"),
|
||||
skipStaleSocketHealthCheck: true,
|
||||
resolveAccountSnapshot: async ({ account, runtime, probe }) => ({
|
||||
accountId: account.accountId,
|
||||
enabled: account.enabled,
|
||||
@@ -283,6 +285,7 @@ describe("computed account status adapters", () => {
|
||||
"builds account snapshots from $name computed account metadata and extras",
|
||||
async ({ createStatus }) => {
|
||||
const status = createStatus();
|
||||
expect(status.skipStaleSocketHealthCheck).toBe(true);
|
||||
await expect(
|
||||
Promise.resolve(
|
||||
status.buildAccountSnapshot?.({
|
||||
|
||||
@@ -68,6 +68,7 @@ function buildComputedAccountStatusAdapterBase<ResolvedAccount, Probe, Audit>(
|
||||
): Omit<ChannelStatusAdapter<ResolvedAccount, Probe, Audit>, "buildAccountSnapshot"> {
|
||||
return {
|
||||
defaultRuntime: options.defaultRuntime,
|
||||
skipStaleSocketHealthCheck: options.skipStaleSocketHealthCheck,
|
||||
buildChannelSummary: options.buildChannelSummary,
|
||||
probeAccount: options.probeAccount,
|
||||
formatCapabilitiesProbe: options.formatCapabilitiesProbe,
|
||||
|
||||
Reference in New Issue
Block a user