feat(api): use nest-pg-boss for spotify interactions

This commit is contained in:
Julian Tölle 2022-06-29 21:29:00 +02:00
parent cd672a408e
commit b9f92bbdfa
9 changed files with 314 additions and 72 deletions

14
src/sources/jobs.ts Normal file
View file

@ -0,0 +1,14 @@
import { createJob } from "@apricote/nest-pg-boss";
export type ICrawlerSupervisorJob = {};
export const CrawlerSupervisorJob = createJob<ICrawlerSupervisorJob>(
"spotify-crawler-supervisor"
);
export type IUpdateSpotifyLibraryJob = {};
export const UpdateSpotifyLibraryJob = createJob<IUpdateSpotifyLibraryJob>(
"update-spotify-library"
);
export type IImportSpotifyJob = { userID: string };
export const ImportSpotifyJob = createJob<IImportSpotifyJob>("import-spotify");