Closed canhhungit closed 1 year ago
Project to test proplem
@canhhungit thanks for writing in. I checked your code. Seems like you are using a cron trigger inside your service class. The way the library is designed and the tenant is resolved is via a Request
scoped object that comes from the client applications. In case of cron triggers they are originated from the backend application itself and not via a client side request. Hence there is no way the module can understand and resolve the correct tenant schema model. I am guessing for this cron cases the connections needs to be manually resolved and used.
Thank you @sandeepsuvit. While waiting from your response, i understand proplem as you said. I resolve it menual with connection string with monggose
@canhhungit thats great and sorry for the delayed response :)
Hi @sandeepsuvit ,
I changed MongooseModule to TenancyModule then i got warning like this.
Task Scheduling and onModuleInit not working. Please check