MCPcopy
hub / github.com/scality/cloudserver / cleanupJob

Function cleanupJob

lib/api/apiUtils/rateLimit/cleanup.js:6–17  ·  view source on GitHub ↗
(log, options = {})

Source from the content-addressed store, hash-verified

4let cleanupTimer = null;
5
6function cleanupJob(log, options = {}) {
7 const expiredConfigs = expireCachedConfigs();
8 const expiredBucketOwners = expireCachedBucketOwners();
9 if (expiredConfigs > 0 || expiredBucketOwners > 0) {
10 log.debug('Rate limit cleanup completed', { expiredConfigs, expiredBucketOwners });
11 }
12
13 cleanupTimer = setTimeout(() => cleanupJob(log, options), rateLimitCleanupInterval);
14 if (!options.skipUnref) {
15 cleanupTimer.unref();
16 }
17}
18
19
20/**

Callers 1

startCleanupJobFunction · 0.85

Calls 1

debugMethod · 0.80

Tested by

no test coverage detected