finished qm symbols / sessions
This commit is contained in:
parent
34671ea427
commit
52436c69b2
6 changed files with 77 additions and 29 deletions
|
|
@ -23,7 +23,7 @@ export async function spiderSymbol(
|
|||
}> {
|
||||
const { prefix, depth = 0, maxDepth = 4 } = input || {};
|
||||
|
||||
this.logger.info('Spider symbol search', { prefix, depth, maxDepth });
|
||||
this.logger.info(`Spider symbol search ${prefix}`, { prefix, depth, maxDepth });
|
||||
|
||||
if (!prefix) {
|
||||
// Root job - create A-Z jobs
|
||||
|
|
@ -60,9 +60,9 @@ export async function spiderSymbol(
|
|||
};
|
||||
}
|
||||
|
||||
await this.mongodb.batchUpsert('qm_symbols', symbols, ['qmSearchCode']);
|
||||
await this.mongodb.batchUpsert('qmSymbols', symbols, ['qmSearchCode']);
|
||||
|
||||
this.logger.info('Stored symbols from spider search', {
|
||||
this.logger.info(`Stored symbols from spider search ${prefix} - ${symbols.length}`, {
|
||||
prefix,
|
||||
count: symbols.length
|
||||
});
|
||||
|
|
@ -82,7 +82,7 @@ export async function spiderSymbol(
|
|||
}
|
||||
|
||||
if (exchanges.length > 0) {
|
||||
await this.mongodb.batchUpsert('qm_exchanges', exchanges, ['exchange']);
|
||||
await this.mongodb.batchUpsert('qmExchanges', exchanges, ['exchange']);
|
||||
this.logger.debug('Stored exchanges from spider search', {
|
||||
count: exchanges.length
|
||||
});
|
||||
|
|
@ -122,7 +122,7 @@ export async function spiderSymbol(
|
|||
};
|
||||
|
||||
} catch (error) {
|
||||
this.logger.error('Spider search failed', { prefix, error });
|
||||
this.logger.error(`Spider search failed ${prefix}`, { prefix, error });
|
||||
return {
|
||||
message: `Spider search failed for prefix: ${prefix}`,
|
||||
symbolsFound: 0
|
||||
|
|
@ -190,7 +190,7 @@ export async function searchSymbols(
|
|||
symbol: (symbol.symbol as string)?.split(':')[0] || '',
|
||||
})) : [];
|
||||
|
||||
this.logger.info('QM API returned symbols', {
|
||||
this.logger.debug('QM API returned symbols ${query} - ${processedSymbols.length}', {
|
||||
query,
|
||||
count: processedSymbols.length
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue