Type Alias KyselySharedLockAdapterSettings

KyselySharedLockAdapterSettings: {
    currentDate?: () => Date;
    enableTransactions?: boolean;
    expiredKeysRemovalInterval?: ITimeSpan;
    kysely: Kysely<KyselySharedLockTables>;
    shouldRemoveExpiredKeys?: boolean;
}

Configuration for KyselySharedLockAdapter. Requires a Kysely database instance with the shared-lock schema applied.

IMPORT_PATH: "@daiso-tech/core/shared-lock/kysely-shared-lock-adapter"

Type declaration

  • OptionalcurrentDate?: () => Date
    () => new Date()
    
  • OptionalenableTransactions?: boolean
    import { Transaction } from "kysely"

    !(settings.kysely instanceof Transaction)
  • OptionalexpiredKeysRemovalInterval?: ITimeSpan
    import { TimeSpan } from "@daiso-tech/core/time-span";

    TimeSpan.fromMinutes(1)
  • kysely: Kysely<KyselySharedLockTables>

    The Kysely database instance with the required shared-lock schema tables applied.

  • OptionalshouldRemoveExpiredKeys?: boolean

    When true, a background task periodically removes expired shared-lock records. Set to false to disable automatic cleanup.

    true