import queue from './utils/queue'

let queueTask = function () {
  queue('updateScoresQueue').add()
}

export default function run () {
  setInterval(queueTask, 60000)
}

import queue from './utils/queue'

let updateScoresInterval = 60
if (process.env.THEMIS_UPDATE_SCORES_INTERVAL) {
  updateScoresInterval = parseInt(process.env.THEMIS_UPDATE_SCORES_INTERVAL, 10)
}

export default function run () {
  setInterval(() => {
    queue('updateScoresQueue').add()
  }, updateScoresInterval * 1000)
}

Refactor score updater