fixed proxy started working on new qm
This commit is contained in:
parent
d989c0c814
commit
e5f505335c
12 changed files with 375 additions and 115 deletions
|
|
@ -8,3 +8,19 @@ export {
|
|||
Disabled,
|
||||
} from './decorators/decorators';
|
||||
export { createJobHandler } from './utils/create-job-handler';
|
||||
|
||||
// Re-export commonly used types from @stock-bot/types for convenience
|
||||
export type {
|
||||
ExecutionContext,
|
||||
IHandler,
|
||||
JobHandler,
|
||||
HandlerConfig,
|
||||
HandlerConfigWithSchedule,
|
||||
HandlerMetadata,
|
||||
OperationMetadata,
|
||||
ScheduledJob,
|
||||
TypedJobHandler,
|
||||
} from '@stock-bot/types';
|
||||
|
||||
// Re-export JobScheduleOptions from BaseHandler
|
||||
export type { JobScheduleOptions } from './base/BaseHandler';
|
||||
|
|
|
|||
|
|
@ -262,29 +262,27 @@ export interface Page {
|
|||
|
||||
// Proxy Manager types
|
||||
export interface ProxyManager {
|
||||
getProxy(key?: string): Promise<ProxyInfo | null>;
|
||||
getProxy(): string | null;
|
||||
getProxyInfo(): ProxyInfo | null;
|
||||
getProxies(count: number, key?: string): Promise<ProxyInfo[]>;
|
||||
releaseProxy(proxy: ProxyInfo | string): Promise<void>;
|
||||
markProxyFailed(proxy: ProxyInfo | string, reason?: string): Promise<void>;
|
||||
getStats(): Promise<ProxyStats>;
|
||||
getStats(): ProxyStats;
|
||||
resetProxy(proxy: ProxyInfo | string): Promise<void>;
|
||||
blacklistProxy(proxy: ProxyInfo | string, duration?: number): Promise<void>;
|
||||
isBlacklisted(proxy: ProxyInfo | string): Promise<boolean>;
|
||||
refreshProxies(): Promise<void>;
|
||||
}
|
||||
|
||||
// ProxyInfo should be imported from @stock-bot/proxy package
|
||||
// to avoid duplication. Using minimal definition here for type compatibility
|
||||
export interface ProxyInfo {
|
||||
id: string;
|
||||
host: string;
|
||||
port: number;
|
||||
protocol: 'http' | 'https';
|
||||
username?: string;
|
||||
password?: string;
|
||||
protocol?: string;
|
||||
country?: string;
|
||||
lastUsed?: Date;
|
||||
failureCount?: number;
|
||||
successCount?: number;
|
||||
averageResponseTime?: number;
|
||||
[key: string]: any; // Allow additional properties from proxy package
|
||||
}
|
||||
|
||||
export interface ProxyStats {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue