Skip to content

Commit

Permalink
Merge pull request #90 from crowdbotics/PLAT-14519-cli-delay
Browse files Browse the repository at this point in the history
PLAT-14519: Resolving issue with segment library hanging CLI
  • Loading branch information
taylor-cb authored Apr 29, 2024
2 parents 561cc4c + 6938ed6 commit 3f54ece
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion scripts/analytics/wrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,12 @@ class AnalyticsWrapper {

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

0 comments on commit 3f54ece

Please sign in to comment.