MCPcopy Index your code
hub / github.com/PostHog/posthog / timeoutGuard

Function timeoutGuard

plugin-server/src/utils/db/utils.ts:31–40  ·  view source on GitHub ↗
(
    message: string,
    context?: Record<string, any>,
    timeout = defaultConfig.TASK_TIMEOUT * 1000
)

Source from the content-addressed store, hash-verified

29}
30
31export function timeoutGuard(
32 message: string,
33 context?: Record<string, any>,
34 timeout = defaultConfig.TASK_TIMEOUT * 1000
35): NodeJS.Timeout {
36 return setTimeout(() => {
37 console.log(`⌛⌛⌛ ${message}`, context)
38 Sentry.captureMessage(message, context ? { extra: context } : undefined)
39 }, timeout)
40}
41
42const campaignParams = new Set([
43 'utm_source',

Callers 15

flushMethod · 0.90
postgresQueryMethod · 0.90
postgresTransactionMethod · 0.90
clickhouseQueryMethod · 0.90
redisGetMethod · 0.90
redisSetMethod · 0.90
redisSetMultiMethod · 0.90
redisIncrMethod · 0.90
redisExpireMethod · 0.90
redisLPushMethod · 0.90
redisLRangeMethod · 0.90
redisLLenMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…