tokenbridge/monitor/checkWorker3.js
Przemyslaw Rzad 5efc9a6688
Update bridge monitor (#38)
* Removed duplicate licence, updated links do Contributing and Licence in sub-readme.

* Renamed bridge-monitor to monitor.

* Removed package-lock.json.

* Added monitor workspace with linting.

* Consistent eslint version.

* Added readme for merging.
2019-05-14 09:17:03 +02:00

24 lines
670 B
JavaScript

const fs = require('fs')
const path = require('path')
const logger = require('./logger')('checkWorker3')
const stuckTransfers = require('./stuckTransfers')
async function checkWorker3() {
try {
logger.debug('calling stuckTransfers()')
const transfers = await stuckTransfers()
// console.log(transfers)
if (!transfers) throw new Error('transfers is empty: ' + JSON.stringify(transfers))
fs.writeFileSync(
path.join(__dirname, '/responses/stuckTransfers.json'),
JSON.stringify(transfers, null, 4)
)
logger.debug('Done')
return transfers
} catch (e) {
logger.error('checkWorker3.js', e)
throw e
}
}
checkWorker3()