Activities of "raif"

Is there any possibility to get try count in the job code ?

Can you explain why do you want to do this?

According to following explanation https://docs.abp.io/en/abp/4.3/Background-Jobs#exception-handling Background job is automatically re-tried after certain period of time. However i would like to control it with re-try count.

In a very simple way:

  • Enqueue job after certain act (e.g. entity creation, any certain logic)
  • Try do some operation
  • If you get exception re-try again
  • If everything went well set "some value" to the "A"
  • If you tried X times and if you still get exception then set "some value" to the "B"

@gterdem Should i create new topic for my question or is it ok keep at here ? Any feedback about "multi-tenant usage of background jobs' is welcome

Thx in advance

Hi @raif, can you solved this problem ? i have a problem like this.

Yes, with help of best practice documentation i'm fine. See : https://docs.abp.io/en/abp/latest/Best-Practices/Entity-Framework-Core-Integration#repository-implementation

Ok, first of all, lets be agree on when license check operation will perform. https://support.abp.io/QA/Questions/69/#answer-d8bebebb-b714-3c1e-7fcb-39f437bc8ba3

According to following anwser, license check should only perform if envrionment value set to the "Development" Then why i need to expose my developer AbpLicenseCode to end user ?

Ensure that your appsettings.json has "AbpLicenseCode" key with your license code.

Can you check the appsettings.json file?

Why should i add license code to get rid off error message ?

**Note **: My migration is working properly even if there is error message on the console screen

ABP Framework version: v4.3 UI type:MVC DB provider: EF Core Tiered (MVC) or Identity Server Separated (Angular): yes

Hello, I guess i can use same topic for the question. Unfortunately documentation doesn't mention about how to achieve multi-tenant usage

Is this background job aware of Tenant ?

By template default my HOST application capable to execute background jobs. I have a separate database for each of my tenants Tenant may want to execute background job which is need to update tenant's table

For this purpose i injected ICurrentTenant service to the Job and tenantId parameters to the job arguments

Is this correct approach

Second question Is there any possibility to get try count in the job code ?

public class BackgroundImportOperationUpdateJob : AsyncBackgroundJob<BackgroundImportOperationUpdateArgs>, ITransientDependency
    {
        private IModelManager ModelManager { get; }
        private ICurrentTenant CurrentTenant { get; }
        public BackgroundImportOperationUpdateJob(
            IModelManager modelManager,
            ICurrentTenant currentTenant)
        {
            ModelManager = modelManager;
            CurrentTenant = currentTenant;
        }
     }
	 
      using (CurrentTenant.Change(args.TenantId))
      {         
             // Perform operation with domain services in the selected tenant
      }	 
		 	 

Doh do i need to set this to able use Find and Get method ?

"If you don't pass any expression to the WithDetailsAsync method, then it includes all the details using the DefaultWithDetailsFunc option you provide."

https://docs.abp.io/en/abp/4.2/Entity-Framework-Core#defaultwithdetailsfunc

Hello, Thx for the reply. I'm sorry i didn't get it https://docs.abp.io/en/abp/4.2/Entity-Framework-Core#loading-related-entities

Why should i override WithDetailsAsync and WithDetails methods ?

I have problem with Find and Get Method not with WithDetailsAsync and

Wasn't your answer already implemented on base EfCoreRepository class? But somehow i need to pass relation info

Thx Alper. Somehow i thought that i override TenantAppService as it is. I forgot webhost and configuration injections..

thx for clarification

thx

Showing 21 to 30 of 37 entries
Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.1.0-preview. Updated on December 08, 2025, 08:24
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.