Skip to content

Commit

Permalink
chore: set heartbeat to random value between 0-59
Browse files Browse the repository at this point in the history
  • Loading branch information
jakowenko committed Jun 17, 2022
1 parent 84ac482 commit bb6f6fb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/src/util/heartbeat.util.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const DETECTORS = require('../constants/config').detectors();
module.exports.cron = async () => {
if (process.env.NODE_ENV !== 'production' || !TELEMETRY) return;
await this.track();
schedule.scheduleJob('*/60 * * * *', () => this.track());
schedule.scheduleJob(`${Math.floor(Math.random() * 60)} * * * *`, () => this.track());
};

module.exports.track = async () =>
Expand Down

0 comments on commit bb6f6fb

Please sign in to comment.