Skip to content

Commit

Permalink
Merge pull request #2 from criblio/story/SAAS-1091/ds/short-poll-for-…
Browse files Browse the repository at this point in the history
…stubs

Story/saas 1091/ds/short poll for stubs
  • Loading branch information
bk-cribl authored Jun 6, 2023
2 parents 2c29622 + fe77bf7 commit cf1b261
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion configuration.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,13 @@ module.exports = (function () {
config.streamUri = canonicalizeUri(config.streamUri);
config.eventsUri = canonicalizeUri(config.eventsUri);

enforceMinimum(config, 'pollInterval', 30);
// Only enforce minimum polling interval if talking to the official server
// This enables shorter poll intervals in scenarios where LD is replaced with a stub server for testing
let minPollInterval = 30;
if ( config.baseUri !== defaultConfig.baseUri ) {
minPollInterval = 1;
}
enforceMinimum(config, 'pollInterval', minPollInterval);
enforceMinimum(config, 'diagnosticRecordingInterval', 60);

return config;
Expand Down

0 comments on commit cf1b261

Please sign in to comment.