mirror of
https://github.com/apricote/Listory.git
synced 2026-01-13 21:21:02 +00:00
Previously it took a minute until the import was started within the normal loop. This way, we create an import job right after the user logs in for the first time.
18 lines
648 B
TypeScript
18 lines
648 B
TypeScript
import { PGBossModule } from "@apricote/nest-pg-boss";
|
|
import { Module } from "@nestjs/common";
|
|
import { TypeOrmRepositoryModule } from "../database/entity-repository/typeorm-repository.module";
|
|
import { ImportSpotifyJob } from "../sources/jobs";
|
|
import { UserRepository } from "./user.repository";
|
|
import { UsersController } from "./users.controller";
|
|
import { UsersService } from "./users.service";
|
|
|
|
@Module({
|
|
imports: [
|
|
TypeOrmRepositoryModule.for([UserRepository]),
|
|
PGBossModule.forJobs([ImportSpotifyJob]),
|
|
],
|
|
providers: [UsersService],
|
|
exports: [UsersService],
|
|
controllers: [UsersController],
|
|
})
|
|
export class UsersModule {}
|