Hey,
I tried to reproduce the issue with the latest version of abp (7.2.2 as of today) and I could not reproduce the issue. I implemented it as described here: https://github.com/nebula2/abp-qa-5139
Can you please check if the issue occurs using the latest version?
kind regards Jack
Hi,
The Abp version is 4.1.0 I created a new solution, and make the request 10 times, 8 requests are abandoned. Two requests are executed.
Thanks, Domina
ABP Framework version: v4.1
UI type: Angular
DB provider: EF Cor
Tiered (MVC) or Identity Server Separated (Angular): no
Exception message and stack trace:
Steps to reproduce the issue:
Try the sample code provided by Abp support: public class TestAppService : MyProjectNameAppService { private readonly IBackgroundJobManager _backgroundJobManager;
public TestAppService(IBackgroundJobManager backgroundJobManager)
{
_backgroundJobManager = backgroundJobManager;
}
public async Task SendDelayEmail()
{
await _backgroundJobManager.EnqueueAsync<EmailNotificationArgs>(
new EmailNotificationArgs { Email = "test", Subject = "test", Body = "test" },
delay: TimeSpan.FromMinutes(3));
}
}
public class EmailNotificationArgs { public string Email { get; set; } public string Subject { get; set; } public string Body { get; set; } }
public class PartyCompleteEmailJob : AsyncBackgroundJob<EmailNotificationArgs>, ITransientDependency { public override Task ExecuteAsync(EmailNotificationArgs args) { Logger.LogInformation("------------- Sending email to " + args.Email + " with subject " + args.Subject + " and body " + args.Body + ""); return Task.CompletedTask; } }
Trigger SendDelayEmail() via Swagger twice, from database
The abandon column at the beginning is 0, wait a while. The Abandon will have value 1
Add a break point to ExecuteAsync(EmailNotificationArgs args) method, the break point is never reached.
After Enqueue a job request to JobManager, AbpBackgroundJobs table, that request IsAbandoned flag is set to 1. If add delay parameter to Enqueue method, say 3 minutes, Job record in AbpBackgroundJobs, the IsAbandoned value is 0, and three minutes later, the IsAbandoned value is 1
It seems that the JobManager can not locate the Job class successfully? How to job manager can locate the corresponding job to handle the parameter? I tried to add jobName attribute to EmailNotificationArgs class, but it doesn't work. There is exception in Log file neither.
"public class PartyCompleteEmailJob : AsyncBackgroundJob<EmailNotificationArgs>, ITransientDependency"
I am wondering how to use AbpModules and Azure Function (Isolated work process, framework 4.8) Except for change our current application module target from .Net Core 5.0 to .Net Standard 2.0: How to resolve the DI for abp modules; How to get access token while call App Services; Use code to setup Current Tenant and Current User (already resolved).
Could you provide an sample code for azure function?
Thanks, Domina Tang If you're creating a bug/problem report, please include followings: