Skip to content
This repository was archived by the owner on Oct 10, 2025. It is now read-only.

Commit 3f54ece

Browse files
authored
Merge pull request #90 from crowdbotics/PLAT-14519-cli-delay
PLAT-14519: Resolving issue with segment library hanging CLI
2 parents 561cc4c + 6938ed6 commit 3f54ece

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

scripts/analytics/wrapper.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,12 @@ class AnalyticsWrapper {
3636

3737
try {
3838
this.analytics = new Analytics({
39-
writeKey: token
39+
writeKey: token,
40+
// Segment node library was built for long running node processes like express.
41+
// Maintain a lower values for flush than library defaults, so that segment does not
42+
// hang CLI node process while waiting for queue to flush.
43+
flushAt: 3,
44+
flushInterval: 100
4045
});
4146
} catch {
4247
// Ignore errors during initialization - TODO: log to sentry

0 commit comments

Comments
 (0)