Add initial jobs implementation
This commit is contained in:
@@ -24,6 +24,8 @@ import { FileModule } from './file/file.module';
|
||||
import { FocoLiveModule } from './foco-live/foco-live.module';
|
||||
import { PowModule } from './pow/pow.module';
|
||||
import { FocoCoffeeModule } from './fococoffee/fococoffee.module';
|
||||
import { JobsModule } from './jobs/jobs.module';
|
||||
import { RedisModule, RedisModuleOptions } from '@liaoliaots/nestjs-redis';
|
||||
|
||||
@Module({
|
||||
imports: [
|
||||
@@ -32,6 +34,20 @@ import { FocoCoffeeModule } from './fococoffee/fococoffee.module';
|
||||
isGlobal: true,
|
||||
load: [configuration],
|
||||
}),
|
||||
RedisModule.forRootAsync({
|
||||
imports: [ConfigModule],
|
||||
inject: [ConfigService],
|
||||
useFactory: async (configService: ConfigService): Promise<RedisModuleOptions> => {
|
||||
return {
|
||||
config: {
|
||||
host: configService.get<string>('redis.host'),
|
||||
port: configService.get<number>('redis.port'),
|
||||
password: configService.get<string>('redis.password'),
|
||||
db: configService.get<number>('redis.db'),
|
||||
}
|
||||
};
|
||||
}
|
||||
}),
|
||||
CacheModule.registerAsync<RedisClientOptions>({
|
||||
isGlobal: true,
|
||||
inject: [ConfigService],
|
||||
@@ -82,6 +98,7 @@ import { FocoCoffeeModule } from './fococoffee/fococoffee.module';
|
||||
FocoLiveModule,
|
||||
PowModule,
|
||||
FocoCoffeeModule,
|
||||
JobsModule,
|
||||
],
|
||||
controllers: [AppController],
|
||||
providers: [AppService],
|
||||
|
Reference in New Issue
Block a user