fixed up more type issues
This commit is contained in:
parent
3a10560de4
commit
87037e013f
9 changed files with 210 additions and 52 deletions
|
|
@ -2,8 +2,7 @@
|
|||
* WebShare Provider for proxy management
|
||||
*/
|
||||
import { getLogger } from '@stock-bot/logger';
|
||||
import type { HandlerConfigWithSchedule } from '@stock-bot/queue';
|
||||
import { handlerRegistry } from '@stock-bot/queue';
|
||||
import { handlerRegistry, createJobHandler, type HandlerConfigWithSchedule } from '@stock-bot/queue';
|
||||
|
||||
const logger = getLogger('webshare-provider');
|
||||
|
||||
|
|
@ -30,7 +29,7 @@ export function initializeWebShareProvider() {
|
|||
name: 'webshare',
|
||||
|
||||
operations: {
|
||||
'fetch-proxies': async _payload => {
|
||||
'fetch-proxies': createJobHandler(async () => {
|
||||
logger.debug('Fetching proxies from WebShare API');
|
||||
|
||||
try {
|
||||
|
|
@ -66,7 +65,7 @@ export function initializeWebShareProvider() {
|
|||
error: error instanceof Error ? error.message : 'Unknown error',
|
||||
};
|
||||
}
|
||||
},
|
||||
}),
|
||||
},
|
||||
|
||||
scheduledJobs: [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue