Skip to content

Commit

Permalink
refactor: 订阅获取成功时,清空错误计数
Browse files Browse the repository at this point in the history
  • Loading branch information
CaoMeiYouRen committed Nov 4, 2024
1 parent 9c59f92 commit 19c87bc
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/services/tasks/tasks.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,9 @@ export class TasksService implements OnApplicationBootstrap {
rss = await rssParserString(resp)
}
}
if (rss) { // 如果成功获取了到 rss 内容,则清空错误计数
await this.cacheService.set(key, 0, ms('1 d')) // 重置错误计数
}
if (!Array.isArray(rss?.items)) {
return
}
Expand Down

0 comments on commit 19c87bc

Please sign in to comment.