removing deprecations

This commit is contained in:
Boki 2025-06-24 15:32:56 -04:00
parent fa67d666dc
commit f6038d385f
21 changed files with 91 additions and 158 deletions

View file

@ -1,4 +1,3 @@
import { getRandomUserAgent } from '@stock-bot/utils';
import type { CeoHandler } from '../ceo.handler';
@ -40,7 +39,7 @@ export async function processIndividualSymbol(
}
this.logger.info(
`Successfully processed CEO symbol ${symbol} shorts and found ${shortCount} positions`,
`Successfully processed CEO symbol ${symbol} shorts and found ${shortCount} positions`
);
return { ceoId, shortCount, timestamp };

View file

@ -39,7 +39,11 @@ export async function processIndividualSymbol(
const spielCount = data.spiels.length;
if (spielCount === 0) {
this.logger.warn(`No spiels found for ceoId ${ceoId}`);
await this.mongodb.updateMany('ceoChannels', { ceoId }, { $set: { lastSpielTime: timestamp, finished: true } });
await this.mongodb.updateMany(
'ceoChannels',
{ ceoId },
{ $set: { lastSpielTime: timestamp, finished: true } }
);
return null; // No data to process
}
const latestSpielTime = data.spiels[0]?.timestamp;
@ -77,7 +81,11 @@ export async function processIndividualSymbol(
}));
await this.mongodb.batchUpsert('ceoPosts', posts, ['spielId']);
await this.mongodb.updateMany('ceoChannels', { ceoId }, { $set: { lastSpielTime: latestSpielTime } });
await this.mongodb.updateMany(
'ceoChannels',
{ ceoId },
{ $set: { lastSpielTime: latestSpielTime } }
);
this.logger.info(`Fetched ${spielCount} spiels for ceoId ${ceoId}`);
await this.scheduleOperation(