mirror of
https://github.com/Litlyx/litlyx
synced 2025-12-10 15:58:38 +01:00
fix pricing + limits email + redis
This commit is contained in:
@@ -25,10 +25,7 @@ export class RedisStreamService {
|
||||
static async connect() {
|
||||
console.log('RedisStreamService DEV_MODE=', process.env.DEV_MODE === 'true');
|
||||
await this.client.connect();
|
||||
setInterval(() => {
|
||||
console.log('Processed:', (RedisStreamService.processed / 30).toFixed(), '/s');
|
||||
RedisStreamService.processed = 0;
|
||||
}, 30_000)
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -48,6 +45,11 @@ export class RedisStreamService {
|
||||
|
||||
static async startReadingLoop(options: ReadingLoopOptions, processFunction: (content: Record<string, string>) => Promise<any>) {
|
||||
|
||||
setInterval(() => {
|
||||
console.log('Processed:', (RedisStreamService.processed / 30).toFixed(), '/s');
|
||||
RedisStreamService.processed = 0;
|
||||
}, 30_000)
|
||||
|
||||
try {
|
||||
console.log('Start reading loop');
|
||||
await this.client.xGroupCreate(options.streamName, 'broker', '0', { MKSTREAM: true, });
|
||||
|
||||
Reference in New Issue
Block a user