Starts in:
99 DAYS
99 HRS
99 MIN
99 SEC
Starts in:
99 D
99 H
99 M
99 S

Activities of "liangshiwei"

See https://github.com/realLiangshiwei/AbpQa431

In the way, you can customize the queue of all jobs

Okey, I will give you a usable example

Hi,

abp vnext is different from the cache design of aspnetboilerplate, it continues the distributed cache design of aspnet core. currently there is no feature to cache groups

Hi,

Please see https://docs.abp.io/en/abp/latest/Object-Extensions

Hi, you can custom the code if you need.

public class MyJobFilterAttribute : JobFilterAttribute, IElectStateFilter
{
    public void OnStateElection(ElectStateContext context)
    {
        if (context.CandidateState is EnqueuedState enqueuedState)
        {
            // you can custom if iyou need.
            enqueuedState.Queue = "myqueue";
        }
    }
}

The filter will work on global. you don't need add attribute to method.

You need add the Volo.Saas.Host.Application to your project and add SaasHostApplicationModule to your module dependencies

  1. Delete the following reference in .web project.
<ProjectReference Include="..\..\modules\Volo.Account.Pro\src\Volo.Abp.Account.Pro.Public.Web\Volo.Abp.Account.Pro.Public.Web.csproj" />
<ProjectReference Include="..\..\modules\Volo.Account.Pro\src\Volo.Abp.Account.Pro.Public.Web.IdentityServer\Volo.Abp.Account.Pro.Public.Web.IdentityServer.csproj" />
  1. Update SampleAppMenuContributor class
public async Task ConfigureMenuAsync(MenuConfigurationContext context)
{
    if (context.Menu.Name == StandardMenus.Main)
    {
        //await ConfigureMainMenu(context);

        var moduleMenu = AddModuleMenuItem(context);
        await AddMenuItemTblTests(context, moduleMenu);
    }
}
  1. This is not a problem, this is by design.

Hi,

Question 1: Could you share the project to me? shiwei.liang@volosoft.com

Question 2: Please show the menu contributors code of the module

Question 3: This is not a problem, settings need to navigate to the authorization server

Hi,

First , create a filter:

public class MyJobFilterAttribute : JobFilterAttribute, IElectStateFilter
{
    public void OnStateElection(ElectStateContext context)
    {
        if (context.CandidateState is EnqueuedState enqueuedState)
        {
            enqueuedState.Queue = "myqueue";
        }
    }
}

Add the following configuration to your module:

Configure<AbpHangfireOptions>(options =>
{
    options.ServerOptions = new BackgroundJobServerOptions()
    {
        Queues = new[] {"default", "myqueue"}
    };
});


context.Services.AddHangfire(options =>
{
    //options.UseMemoryStorage();
    options.UseFilter(new MyJobFilterAttribute());
});

Now, your all job will enqueue to the myqueue queue and you can custom if you need.

Showing 2051 to 2060 of 2428 entries
Made with ❤️ on ABP v9.2.0-preview. Updated on January 22, 2025, 10:44