switched proxy and batch to new redis
This commit is contained in:
parent
e98b1d8ae2
commit
a86367bec5
3 changed files with 29 additions and 521 deletions
|
|
@ -1,5 +1,5 @@
|
|||
import { getLogger } from '@stock-bot/logger';
|
||||
import createCache, { type CacheProvider } from '@stock-bot/cache';
|
||||
import { createCache, type CacheProvider } from '@stock-bot/cache';
|
||||
import { HttpClient, ProxyInfo } from '@stock-bot/http';
|
||||
import pLimit from 'p-limit';
|
||||
|
||||
|
|
@ -110,8 +110,7 @@ async function resetProxyStats(): Promise<void> {
|
|||
async function initializeSharedResources() {
|
||||
if (!logger) {
|
||||
logger = getLogger('proxy-tasks');
|
||||
cache = createCache('hybrid', {
|
||||
name: 'proxy-tasks',
|
||||
cache = createCache({
|
||||
keyPrefix: 'proxy:',
|
||||
ttl: PROXY_CONFIG.CACHE_TTL,
|
||||
enableMetrics: true
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue