diff --git a/lib/manager/travis/package.js b/lib/manager/travis/package.js index 0ad72ddee5af1c728ddd8f710f2a8acb2c167783..be01696fc361062b14a992c9dd1f4c74d88d0baf 100644 --- a/lib/manager/travis/package.js +++ b/lib/manager/travis/package.js @@ -50,7 +50,10 @@ for (const data of Object.values(nodeJsSchedule)) { const offsetmilliseconds = 1 + fieldDate.getTime() - initTime.getTime(); // istanbul ignore if if (offsetmilliseconds < 10000000000) { - setTimeout(generatePolicies, offsetmilliseconds); + global.renovateTimers = global.renovateTimers || []; + global.renovateTimers.push( + setTimeout(generatePolicies, offsetmilliseconds) + ); } } } diff --git a/lib/workers/global/index.js b/lib/workers/global/index.js index f95bb6fcb11c823003702d9ec43fb6d736f80da2..c2bfc8cfa738a1ea434a035d61c7f0bdab99aa5c 100644 --- a/lib/workers/global/index.js +++ b/lib/workers/global/index.js @@ -64,6 +64,10 @@ async function start() { await repositoryWorker.renovateRepository(repoConfig); } logger.setMeta({}); + // istanbul ignore if + if (global.renovateTimers) { + global.renovateTimers.forEach(timer => clearTimeout(timer)); + } logger.info(`${appName} finished`); } catch (err) /* istanbul ignore next */ { logger.fatal({ err }, `Fatal error: ${err.message}`);