mirror of
https://github.com/apricote/Listory.git
synced 2026-01-13 21:21:02 +00:00
feat(api): custom spotify crawler interval
This commit is contained in:
parent
97f5ef70ac
commit
66fd6ce1b4
6 changed files with 46 additions and 4 deletions
|
|
@ -15,5 +15,6 @@ import { SpotifyService } from "./spotify.service";
|
|||
SpotifyAuthModule,
|
||||
],
|
||||
providers: [SpotifyService],
|
||||
exports: [SpotifyService],
|
||||
})
|
||||
export class SpotifyModule {}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
import { Injectable } from "@nestjs/common";
|
||||
import { Interval } from "@nestjs/schedule";
|
||||
import { ListensService } from "../../listens/listens.service";
|
||||
import { Logger } from "../../logger/logger.service";
|
||||
import { Album } from "../../music-library/album.entity";
|
||||
|
|
@ -31,7 +30,6 @@ export class SpotifyService {
|
|||
this.logger.setContext(this.constructor.name);
|
||||
}
|
||||
|
||||
@Interval(20 * 1000)
|
||||
async runCrawlerForAllUsers(): Promise<void> {
|
||||
this.logger.debug("Starting Spotify crawler loop");
|
||||
const users = await this.usersService.findAll();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue