* Stop the periodic cleanup job * Used for graceful shutdown or testing
(log)
| 51 | * Used for graceful shutdown or testing |
| 52 | */ |
| 53 | function stopCleanupJob(log) { |
| 54 | if (cleanupTimer !== null) { |
| 55 | clearTimeout(cleanupTimer); |
| 56 | cleanupTimer = null; |
| 57 | if (log) { |
| 58 | log.info('Stopped rate limit cleanup job'); |
| 59 | } |
| 60 | } |
| 61 | } |
| 62 | |
| 63 | module.exports = { |
| 64 | startCleanupJob, |