UNPKG

bot18

Version:

A high-frequency cryptocurrency trading bot by Zenbot creator @carlos8f

15 lines (14 loc) 371 B
var lockfile = require('lockfile') module.exports = function container (get, set) { return function unlockDb (cb) { get('console').log('motley-json: unlocking db...') try { lockfile.unlockSync(get('conf.db.json').path + '.lock') } catch (e) { return cb(e) } get('console').log('motley-json: db unlocked.') setImmediate(cb) } }