tokenbridge/oracle/config/swap-tokens-worker.config.js

21 lines
542 B
JavaScript
Raw Normal View History

2019-11-28 22:31:27 +03:00
const baseConfig = require('./base.config')
2019-11-28 22:56:18 +03:00
const { EXIT_CODES } = require('../src/utils/constants')
2019-11-28 22:31:27 +03:00
const id = `${baseConfig.id}-swap-tokens`
2019-11-28 22:56:18 +03:00
const workerRequired = baseConfig.id === 'erc-native'
if (!workerRequired) {
console.error(`Swap tokens worker not required for bridge mode ${process.env.ORACLE_BRIDGE_MODE}`)
process.exit(EXIT_CODES.WATCHER_NOT_REQUIRED)
}
2019-11-28 22:31:27 +03:00
module.exports = {
...baseConfig.bridgeConfig,
...baseConfig.foreignConfig,
workerQueue: 'swap-tokens',
senderQueue: 'foreign',
name: `worker-${id}`,
id
}