ABP Framework version: v5.0.1
UI type: MVC
DB provider: EF Core
Tiered (MVC) or Identity Server Separated (Angular): no
Exception message and stack trace:
Steps to reproduce the issue:"
Step 1. We are enqueuing the emails by calling in our code * await _backgroundJobManager.EnqueueAsync(new EmailArgs() { //Object });
But in the below "ExecuteAsync" is being called multiple times in our code.
public class NotificationSendingJob : AsyncBackgroundJob<EmailArgs >, ITransientDependency
{
public NotificationSendingJob()
{
}
[UnitOfWork]
public override Task ExecuteAsync(EmailArgs args)
{
AsyncHelper.RunSync(() => SendNotification(args.TenantId, emailcontent));
return Task.FromResult(0);
}
}
We want to restrict it to single time.
4 Answer(s)
-
0
Hi,
I will check it.
-
0
-
0
Hi,
I can't reproduce the problem, can you share all steps to reproduce it?
We are sending an email in the ExecuteAsync method, so i doubt delay in sending email is triggering it multiple times.
For test, Even if put a debug point on ExceuteAsync and wait for couple of seconds before continue i'm receiving multiple hits.
-
0
Hi,
Sorry I still can't reproduce, can you provide a simple project to me? shiwei.liang@volosoft.com thanks.