Hi,
Apologies, I think I've found the issue. The method I'm calling to enqueue the job is an async method, and I was calling it in n non-async method. I thought Visual Studio would produce a compiler warning for this but it doesn't.
Calling BackgroundJobManager.EnqueueAsync in a non-async method can produce unexpected results, because BackgroundJobManager is a singleton, which means the IBackgroundJobStore can end up participating in multiple, unrelated UnitOfWorks. This can result in multiple in UnitOfWorks trying to insert the same job, depending on thread timing.
Apologies, again.
Hi,
Yes it does, thank you.
Hi,
We're performing load tests on our application using JMeter, and we've noticed a lot of DB queries to get the current tenant details. I'm assuming it's for correctly configuring the Unit Of Work.for each API service call etc.
We're investigating caching the Tenant details, as it's unlikey the Tenant details are likely to change that often, in order to reduce the numbers of queries to the DB.
My questions are, does the ABP framework already cache tenant details? If not, does the framework use TenantManager or IRepository<Tenant> to perform these queries? What's the simplest way to cache Tenant details?
Thanks,