small fixes
This commit is contained in:
parent
87037e013f
commit
98aa414231
6 changed files with 33 additions and 33 deletions
|
|
@ -2,7 +2,11 @@
|
|||
* WebShare Provider for proxy management
|
||||
*/
|
||||
import { getLogger } from '@stock-bot/logger';
|
||||
import { handlerRegistry, createJobHandler, type HandlerConfigWithSchedule } from '@stock-bot/queue';
|
||||
import {
|
||||
createJobHandler,
|
||||
handlerRegistry,
|
||||
type HandlerConfigWithSchedule,
|
||||
} from '@stock-bot/queue';
|
||||
|
||||
const logger = getLogger('webshare-provider');
|
||||
|
||||
|
|
@ -18,7 +22,7 @@ export function getProxy(): string | null {
|
|||
|
||||
const proxy = proxies[currentProxyIndex];
|
||||
currentProxyIndex = (currentProxyIndex + 1) % proxies.length;
|
||||
return proxy;
|
||||
return proxy ?? null;
|
||||
}
|
||||
|
||||
// Initialize and register the WebShare provider
|
||||
|
|
@ -97,7 +101,7 @@ async function fetchProxiesFromWebShare(): Promise<string[] | null> {
|
|||
// Get configuration from config system
|
||||
const { getConfig } = await import('@stock-bot/config');
|
||||
const config = getConfig();
|
||||
|
||||
|
||||
// Get configuration from config system
|
||||
const apiKey = config.webshare?.apiKey;
|
||||
const apiUrl = config.webshare?.apiUrl;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue