-
Notifications
You must be signed in to change notification settings - Fork 9
Home
- ACQUIRE_INTERVAL
- IS_ONE_PROCESS
- RETRY_DELAY
- RETRY_LIMIT
- RX_LOCK_CHANNEL
- SCHEMA_NAME
- SHUTDOWN_TIMEOUT
- timer
Ƭ AnyJson: boolean | number | string | null | JsonArray | JsonMap
Defined in src/types/AnyJson.ts:19
Represents any JSON-serializable value
• ACQUIRE_INTERVAL: 30000 = 30000
Defined in src/constants.ts:21
• IS_ONE_PROCESS: true = true
Defined in src/constants.ts:20
• RETRY_DELAY: 100 = 100
Defined in src/constants.ts:18
• RETRY_LIMIT: number = Infinity
Defined in src/constants.ts:19
• RX_LOCK_CHANNEL: RegExp = new RegExp(^__${PgIpLock.name}__:
)
Defined in src/PgIpLock.ts:344
• SCHEMA_NAME: "pgip_lock" = "pgip_lock"
Defined in src/constants.ts:16
• SHUTDOWN_TIMEOUT: 500 = 500
Defined in src/constants.ts:17
• timer: any
Defined in src/PgIpLock.ts:346
▸ pack(input
: AnyJson, logger?
: AnyLogger, pretty
: boolean): string
Defined in src/helpers.ts:27
Serializes given input object to JSON string. On error will return serialized null value
Parameters:
Name | Type | Default | Description |
---|---|---|---|
input |
AnyJson | - | serializable object |
logger? |
AnyLogger | - | - |
pretty |
boolean | false | - |
Returns: string
▸ terminate(): Promise‹void›
Defined in src/PgIpLock.ts:351
Performs graceful shutdown of running process releasing all instantiated locks and properly destroy all their instances.
Returns: Promise‹void›
▸ unpack(input?
: undefined | string, logger?
: AnyLogger): AnyJson
Defined in src/helpers.ts:57
Deserializes given input JSON string to corresponding JSON value object. On error will return empty object
Parameters:
Name | Type | Description |
---|---|---|
input? |
undefined | string | string to deserialize |
logger? |
AnyLogger | - |
Returns: AnyJson
Defined in src/types/PgPubSubOptions.ts:87
Hard-coded pre-set of PgPubSubOptions
see
PgPubSubOptions
type
{PgPubSubOptions}
• acquireInterval: number = ACQUIRE_INTERVAL
Defined in src/types/PgPubSubOptions.ts:91
• retryDelay: number = RETRY_DELAY
Defined in src/types/PgPubSubOptions.ts:89
• retryLimit: number = RETRY_LIMIT
Defined in src/types/PgPubSubOptions.ts:88
• singleListener: true = IS_ONE_PROCESS
Defined in src/types/PgPubSubOptions.ts:90