diff --git a/packages/@webex/plugin-meetings/src/config.ts b/packages/@webex/plugin-meetings/src/config.ts index 28c451ab152..0126174c494 100644 --- a/packages/@webex/plugin-meetings/src/config.ts +++ b/packages/@webex/plugin-meetings/src/config.ts @@ -96,6 +96,6 @@ export default { iceCandidatesGatheringTimeout: undefined, backendIpv6NativeSupport: false, reachabilityGetClusterTimeout: 5000, - logUploadIntervalMultiplicationFactor: 0, // if set to 0 or undefined, logs won't be uploaded periodically + logUploadIntervalMultiplicationFactor: 0, // if set to 0 or undefined, logs won't be uploaded periodically, if you want periodic logs, recommended value is 1 }, }; diff --git a/packages/@webex/plugin-meetings/src/meeting/index.ts b/packages/@webex/plugin-meetings/src/meeting/index.ts index f5311e002e3..7dbddba2dfb 100644 --- a/packages/@webex/plugin-meetings/src/meeting/index.ts +++ b/packages/@webex/plugin-meetings/src/meeting/index.ts @@ -4099,10 +4099,11 @@ export default class Meeting extends StatelessWebexPlugin { */ private setLogUploadTimer() { // start with short timeouts and increase them later on so in case users have very long multi-hour meetings we don't get too fragmented logs - const LOG_UPLOAD_INTERVALS = [0.1, 1, 15, 15, 30, 30, 30, 60]; + const LOG_UPLOAD_INTERVALS = [0.1, 15, 30, 60]; // in minutes const delay = 1000 * + 60 * // @ts-ignore - config coming from registerPlugin this.config.logUploadIntervalMultiplicationFactor * LOG_UPLOAD_INTERVALS[this.logUploadIntervalIndex]; diff --git a/packages/@webex/plugin-meetings/test/unit/spec/meeting/index.js b/packages/@webex/plugin-meetings/test/unit/spec/meeting/index.js index 71a930a9253..3da4ad7b048 100644 --- a/packages/@webex/plugin-meetings/test/unit/spec/meeting/index.js +++ b/packages/@webex/plugin-meetings/test/unit/spec/meeting/index.js @@ -2492,9 +2492,11 @@ describe('plugin-meetings', () => { mediaSettings: {}, }); - const checkLogCounter = (delay, expectedCounter) => { + const checkLogCounter = (delayInMinutes, expectedCounter) => { + const delayInMilliseconds = delayInMinutes * 60 * 1000; + // first check that the counter is not increased just before the delay - clock.tick(delay - 50); + clock.tick(delayInMilliseconds - 50); assert.equal(logUploadCounter, expectedCounter - 1); // and now check that it has reached expected value after the delay @@ -2502,22 +2504,18 @@ describe('plugin-meetings', () => { assert.equal(logUploadCounter, expectedCounter); }; - checkLogCounter(100, 1); - checkLogCounter(1000, 2); - checkLogCounter(15000, 3); - checkLogCounter(15000, 4); - checkLogCounter(30000, 5); - checkLogCounter(30000, 6); - checkLogCounter(30000, 7); - checkLogCounter(60000, 8); - checkLogCounter(60000, 9); - checkLogCounter(60000, 10); - - // simulate media connection being removed -> no more log uploads should happen + checkLogCounter(0.1, 1); + checkLogCounter(15, 2); + checkLogCounter(30, 3); + checkLogCounter(60, 4); + checkLogCounter(60, 5); + + // simulate media connection being removed -> 1 more upload should happen, but nothing more afterwards meeting.mediaProperties.webrtcMediaConnection = undefined; + checkLogCounter(60, 6); - clock.tick(60000); - assert.equal(logUploadCounter, 11); + clock.tick(120*1000*60); + assert.equal(logUploadCounter, 6); clock.restore(); });