New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Async configuration does not allow an array of BullModuleOptions[] #13
Comments
Might be related to #12 |
Hi @CodebyOmar could you provide some information on the observed behavior? |
I went through the code; export interface BullModuleOptions {
name?: string;
options?: Bull.QueueOptions;
processors?: BullQueueProcessor[];
}
export interface BullOptionsFactory {
createBullOptions(): Promise<BullModuleOptions> | BullModuleOptions;
}
export interface BullModuleAsyncOptions extends Pick<ModuleMetadata, 'imports'> {
name?: string;
useExisting?: Type<BullOptionsFactory>;
useClass?: Type<BullOptionsFactory>;
useFactory?: (...args: any[]) => Promise<BullModuleOptions> | BullModuleOptions;
inject?: any[];
} Notice: The function |
Has anyone found a solution to this? Its critical to our project right now please. |
Hi @CodebyOmar However, things do not work exactly as suggested by you code sample but rather like this: BullModule.forRootAsync([
{
name: 'settlement',
imports: [PayModule],
inject: [PayService],
useFactory: (payService: PayService) => ({
options: {
redis: {
port: 6379
}
}
})
},
{
name: 'collation',
imports: [PayModule],
inject: [PayService],
useFactory: (payService: PayService) => ({
options: {
redis: {
port: 6379
}
}
})
},
]) I'll most probably release this tomorrow. I'd like to add some more tests before. Feel free to share your feedback about this implementation since it does not exactly match your expectations. |
The text was updated successfully, but these errors were encountered: