From 4905e7db2ccdd4bde4585a808dd90915fdd9f7db Mon Sep 17 00:00:00 2001 From: Eric Mc Sween Date: Thu, 3 Sep 2020 15:30:07 -0400 Subject: [PATCH] Decaf cleanup: unused vars --- services/clsi/app/js/DockerRunner.js | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/services/clsi/app/js/DockerRunner.js b/services/clsi/app/js/DockerRunner.js index cfe8d1166a..3e635cdb5e 100644 --- a/services/clsi/app/js/DockerRunner.js +++ b/services/clsi/app/js/DockerRunner.js @@ -1,8 +1,4 @@ -/* eslint-disable - no-return-assign, - no-unused-vars, -*/ -let DockerRunner, oneHour +let DockerRunner const Settings = require('settings-sharelatex') const logger = require('logger-sharelatex') const Docker = require('dockerode') @@ -14,6 +10,7 @@ const fs = require('fs') const Path = require('path') const _ = require('lodash') +const ONE_HOUR_IN_MS = 60 * 60 * 1000 logger.info('using docker runner') const usingSiblingContainers = () => @@ -559,8 +556,7 @@ module.exports = DockerRunner = { // handle expiry of docker containers - MAX_CONTAINER_AGE: - Settings.clsi.docker.maxContainerAge || (oneHour = 60 * 60 * 1000), + MAX_CONTAINER_AGE: Settings.clsi.docker.maxContainerAge || ONE_HOUR_IN_MS, examineOldContainer(container, callback) { const name = container.Name || (container.Names && container.Names[0]) @@ -618,7 +614,7 @@ module.exports = DockerRunner = { logger.error({ err }, 'failed to destroy old containers') } }), - (oneHour = 60 * 60 * 1000) + ONE_HOUR_IN_MS ) }, randomDelay) },