Activities of "maliming"

See https://github.com/abpframework/abp/blob/rel-7.0/framework/src/Volo.Abp.BackgroundJobs/Volo/Abp/BackgroundJobs/BackgroundJobWorker.cs#L42

public class MyBackgroundJob : AsyncBackgroundJob, ITransientDependency
{
    private readonly IMyDomainService _myDomainService;
    private readonly IAbpDistributedLock _distributedLock;

    public MyBackgroundJob(IMyDomainService myDomainService,
        IAbpDistributedLock distributedLock)
    {
        _myDomainService = myDomainService;
        _distributedLock = distributedLock;
    }

    public override async Task ExecuteAsync(MyRequest args)
    {
        await using (var handle = await _distributedLock.TryAcquireAsync("DistributedLockName"))
        {
            if (handle != null)
            {
                await _myDomainService.MyMethod(args);
            }
        }
    }
}

Documentation suggests using IDistributedLockProvider instead of IAbpDistributedLock

I don't think so.

https://docs.abp.io/en/abp/latest/Distributed-Locking#using-the-iabpdistributedlock-service

Btw, is IAbpDistributedLock really distributed or in-process? Because we are in a real distributed environment and need a real distributed lock.

It will be really distributed when you use the AbpDistributedLockingModule and context.Services.AddSingleton<IDistributedLockProvider>

hi

Is this menu page MVC or Angular?

hi

You have PaymentWebOptions in appsettings.json, Do you have Configure code?

var configuration = context.Services.GetConfiguration();
Configure<PaymentWebOptions>(configuration.GetSection("PaymentWebOptions"));

OR

Configure<PaymentWebOptions>(options =>
{
    options.RootUrl = configuration["AppSelfUrl"];
    options.CallbackUrl = configuration["AppSelfUrl"] + "/PaymentSucceed";
});

https://docs.abp.io/en/commercial/latest/modules/payment#enabling-webhooks

hi

Blazor or Blazor Server?

I think it is the current practice to pass the token in the URL.

Related topic: https://github.com/abpframework/abp/issues/5239

hi

Please try to use IAbpDistributedLock.

I can't reproduce the problem, can you try the following code?

context.Services.AddSingleton<IDistributedLockProvider>(sp =>
{
    var connection = ConnectionMultiplexer.Connect(configuration["Redis:Configuration"]);
    return new RedisDistributedSynchronizationProvider(connection.GetDatabase());
});

app.Use(async (httpContext, next) =>
{
    await using (var handler = await httpContext.RequestServices.GetRequiredService<IAbpDistributedLock>().TryAcquireAsync("AbpBackgroundJobWorker", TimeSpan.FromSeconds(10)))
    {
        httpContext.Response.StatusCode = 200;
        return;
    }
    await next(httpContext);
});

ok, I will check it.

hi

If the problem cannot be reproduced every time, you can observe it for a while.

Showing 9481 to 9490 of 12936 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.8.0-preview. Updated on November 12, 2026, 06:07
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.