mirror of
https://github.com/tornadocash/tornado-pool-relayer
synced 2024-02-02 15:04:09 +01:00
fix: redis url
This commit is contained in:
parent
fa6ce3ca65
commit
2259d7d15f
@ -5,6 +5,11 @@ LETSENCRYPT_HOST=
|
||||
# server settings
|
||||
PORT=8000
|
||||
|
||||
# for production
|
||||
REDIS_URL=redis://redis/0
|
||||
# for development
|
||||
# REDIS_URL=localhost
|
||||
|
||||
CHAIN_ID=100
|
||||
|
||||
REWARD_ADDRESS=
|
||||
|
@ -11,8 +11,8 @@
|
||||
"build": "nest build",
|
||||
"format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"",
|
||||
"start": "nest start",
|
||||
"start:dev": "NODE_ENV=development nest start --watch",
|
||||
"start:debug": "NODE_ENV=development nest start --debug --watch",
|
||||
"start:dev": "nest start --watch",
|
||||
"start:debug": "nest start --debug --watch",
|
||||
"start:prod": "yarn prebuild; yarn build; node dist/src/main",
|
||||
"lint": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix",
|
||||
"test": "jest",
|
||||
|
@ -1,11 +1,7 @@
|
||||
import { registerAs } from '@nestjs/config';
|
||||
|
||||
export default registerAs('bull', () => ({
|
||||
name: 'transaction',
|
||||
redis: {
|
||||
host: process.env.NODE_ENV === 'development' ? 'localhost' : 'redis',
|
||||
port: 6379,
|
||||
},
|
||||
redis: process.env.REDIS_URL || 'localhost',
|
||||
settings: {
|
||||
lockDuration: 300000,
|
||||
lockRenewTime: 30000,
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { BullModule } from '@nestjs/bull';
|
||||
import { Module } from '@nestjs/common';
|
||||
import { BullModule } from '@nestjs/bull';
|
||||
|
||||
import { GasPriceService, ProviderService, OffchainPriceService } from '@/services';
|
||||
|
||||
@ -8,7 +8,12 @@ import { TransactionProcessor } from './transaction.processor';
|
||||
import bullConfig from '@/config/bull.config';
|
||||
|
||||
@Module({
|
||||
imports: [BullModule.registerQueue(bullConfig())],
|
||||
imports: [
|
||||
BullModule.registerQueueAsync({
|
||||
name: 'transaction',
|
||||
useFactory: bullConfig,
|
||||
}),
|
||||
],
|
||||
providers: [GasPriceService, ProviderService, TransactionProcessor, OffchainPriceService],
|
||||
exports: [BullModule],
|
||||
})
|
||||
|
@ -157,6 +157,8 @@ export class TransactionProcessor extends BaseProcessor<Transaction> {
|
||||
throw new Error(`Revert by smart contract: ${error}`);
|
||||
}
|
||||
|
||||
console.log('handleError:', message);
|
||||
|
||||
throw new Error('Relayer did not send your transaction. Please choose a different relayer.');
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user