Skip to content

Commit

Permalink
fix(scraper): fix job arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
mytlogos committed Sep 10, 2022
1 parent c094094 commit 2b9b476
Showing 1 changed file with 5 additions and 16 deletions.
21 changes: 5 additions & 16 deletions packages/scraper/src/scheduler/job.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,35 +25,24 @@ export function createJob(item: JobItem): Job | undefined {

switch (item.type) {
case ScrapeName.newsAdapter:
args = item.arguments;
break;
case ScrapeName.checkTocs:
break;
case ScrapeName.feed:
args = item.arguments;
break;
case ScrapeName.news:
args = item.arguments;
break;
case ScrapeName.oneTimeToc:
args = JSON.parse(item.arguments as string);
break;
case ScrapeName.oneTimeUser:
args = JSON.parse(item.arguments as string);
break;
case ScrapeName.queueExternalUser:
case ScrapeName.searchForToc:
args = JSON.parse(item.arguments as string);
break;
case ScrapeName.queueTocs:
break;
case ScrapeName.remapMediaParts:
break;
case ScrapeName.toc:
args = JSON.parse(item.arguments as string);
args.lastRequest = item.lastRun;
break;
case ScrapeName.searchForToc:
args = JSON.parse(item.arguments as string);
case ScrapeName.checkTocs:
case ScrapeName.queueTocs:
case ScrapeName.removeUsedMediaInWaits:
case ScrapeName.remapMediaParts:
break;
default:
logger.warn("unknown job type", { job_type: item.type, job_id: item.id });
Expand Down

0 comments on commit 2b9b476

Please sign in to comment.