removed deprecated createLogger and replaced with getLogger
This commit is contained in:
parent
5d8b102422
commit
c10a524aa8
29 changed files with 93 additions and 136 deletions
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* Data Service - Combined live and historical data ingestion
|
||||
*/
|
||||
import { createLogger } from '@stock-bot/logger';
|
||||
import { getLogger } from '@stock-bot/logger';
|
||||
import { loadEnvVariables } from '@stock-bot/config';
|
||||
import { Hono } from 'hono';
|
||||
import { serve } from '@hono/node-server';
|
||||
|
|
@ -10,7 +10,7 @@ import { serve } from '@hono/node-server';
|
|||
loadEnvVariables();
|
||||
|
||||
const app = new Hono();
|
||||
const logger = createLogger('data-service');
|
||||
const logger = getLogger('data-service');
|
||||
|
||||
const PORT = parseInt(process.env.DATA_SERVICE_PORT || '3002');
|
||||
// Health check endpoint
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
/**
|
||||
* Unified data interface for live and historical data
|
||||
*/
|
||||
import { createLogger } from '@stock-bot/logger';
|
||||
import { getLogger } from '@stock-bot/logger';
|
||||
import { QuestDBClient } from '@stock-bot/questdb-client';
|
||||
import { EventBus } from '@stock-bot/event-bus';
|
||||
|
||||
const logger = createLogger('unified-data-provider');
|
||||
const logger = getLogger('unified-data-provider');
|
||||
|
||||
export interface MarketData {
|
||||
symbol: string;
|
||||
|
|
|
|||
|
|
@ -7,10 +7,10 @@ export class ProxyService {
|
|||
private logger = new Logger('proxy-service');
|
||||
private cache: CacheProvider = createCache('hybrid');
|
||||
private httpClient: HttpClient;
|
||||
private readonly concurrencyLimit = pLimit(200);
|
||||
private readonly concurrencyLimit = pLimit(250);
|
||||
private readonly CACHE_KEY = 'proxy';
|
||||
private readonly CACHE_TTL = 86400; // 24 hours
|
||||
private readonly CHECK_TIMEOUT = 7000;
|
||||
private readonly CHECK_TIMEOUT = 5000;
|
||||
private readonly CHECK_IP = '99.246.102.205'
|
||||
private readonly CHECK_URL = 'https://proxy-detection.stare.gg/?api_key=bd406bf53ddc6abe1d9de5907830a955';
|
||||
private readonly PROXY_SOURCES = [
|
||||
|
|
@ -164,7 +164,7 @@ export class ProxyService {
|
|||
*/
|
||||
async checkProxy(proxy: ProxyInfo): Promise<ProxyInfo> {
|
||||
let success = false;
|
||||
this.logger.debug('Checking Proxy : ', {
|
||||
this.logger.debug(`Checking Proxy with ${this.concurrencyLimit.pendingCount } pending: `, {
|
||||
protocol: proxy.protocol,
|
||||
host: proxy.host,
|
||||
port: proxy.port,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue