@effectstream/utils 0.100.19 → 0.100.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/config.ts +10 -0
package/package.json
CHANGED
package/src/config.ts
CHANGED
|
@@ -307,6 +307,13 @@ const definitions: Record<string, ConfigDefinition> = {
|
|
|
307
307
|
description:
|
|
308
308
|
"Snapshot retention: keep one snapshot per day for this many days. Snapshots older than this are deleted. Default: 7.",
|
|
309
309
|
},
|
|
310
|
+
EFFECTSTREAM_COALESCE_EMPTY_BLOCKS: {
|
|
311
|
+
key: "EFFECTSTREAM_COALESCE_EMPTY_BLOCKS",
|
|
312
|
+
type: "boolean",
|
|
313
|
+
defaultValue: false,
|
|
314
|
+
description:
|
|
315
|
+
"Fold consecutive empty catch-up blocks into one DB transaction when behind the chain tip. Default: false.",
|
|
316
|
+
},
|
|
310
317
|
} as const;
|
|
311
318
|
|
|
312
319
|
type ENV_TYPES = string | number | boolean | undefined;
|
|
@@ -441,6 +448,9 @@ export class ENV {
|
|
|
441
448
|
static get EFFECTSTREAM_SNAPSHOT_LAST_N_DAYS(): number {
|
|
442
449
|
return ENV.getConfig(definitions.EFFECTSTREAM_SNAPSHOT_LAST_N_DAYS);
|
|
443
450
|
}
|
|
451
|
+
static get EFFECTSTREAM_COALESCE_EMPTY_BLOCKS(): boolean {
|
|
452
|
+
return ENV.getConfig(definitions.EFFECTSTREAM_COALESCE_EMPTY_BLOCKS);
|
|
453
|
+
}
|
|
444
454
|
|
|
445
455
|
public static getConfig<T>(config: ConfigDefinition): T {
|
|
446
456
|
switch (config.type) {
|