- GET /system/health splits processes into current instances (hosts with
a beat in the last 10 min, newest per host+kind, not stopped) and
retiredProcesses[]; 45s stale and level only consider current ones
- heartbeat writer marks stopped_at on graceful exit (migration 0043),
upsert clears it; pure api role now stops its writer on SIGTERM
- scheduled job system.heartbeat_cleanup (maintain, 1h) deletes rows
without a beat for 24h and samples older than 7 days
- status page: per-role alarms ("io worker 45 秒没有心跳"), collapsible
retired instances; glossary/runbook updated
- bump all members to 0.2.2, CHANGELOG [0.2.2]
Co-Authored-By: Claude Opus 5.5 <[email protected]>
22 lines
666 B
TypeScript
22 lines
666 B
TypeScript
// 统一从本包取 Kysely 与 sql,避免各包各装一份 kysely
|
|
export { type Kysely, type Selectable, sql, type Transaction } from "kysely";
|
|
export {
|
|
type CachedOptions,
|
|
cachedCall,
|
|
DEFAULT_CACHE_SIZE,
|
|
DEFAULT_CACHE_TTL,
|
|
PgCache,
|
|
pgCacheFor,
|
|
type SetOptions as CacheSetOptions,
|
|
} from "./cache.ts";
|
|
export { type CreateDbOptions, createDb } from "./client.ts";
|
|
export { createMigrator, MIGRATIONS_DIR, type MigratorOptions, migrateToLatest, resetSchema } from "./migrator.ts";
|
|
export {
|
|
type AcquireOptions,
|
|
type AcquireResult,
|
|
type BucketSpec,
|
|
PgTokenBucket,
|
|
pgTokenBucketFor,
|
|
} from "./rate-limit.ts";
|
|
export type * from "./types.ts";
|