Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

Hangfire Re-Queue & Job History #3688


User avatar
0
ervingayle created

I am looking to provide the ability for users to re-queue a group of jobs for processing again. In the use case of a marketing campaign, you may want to send a message multiple times or customize the message without modifying the recipient list. I have everything working in terms of creating the jobs and processing however I would like to show the tenant users the ability to re-queue the jobs. Each recipient is mapped to a single job (i.e 3000 recipients = 3000 jobs).

Also, in my web module I added:

//Configure Hangfire - ENABLE TO USE HANGFIRE INSTEAD OF DEFAULT JOB MANAGER
            Configuration.BackgroundJobs.UseHangfire(configuration =>
            {
                configuration.GlobalConfiguration.UseSqlServerStorage("Default",
                    new Hangfire.SqlServer.SqlServerStorageOptions
                    {
                        JobExpirationCheckInterval = TimeSpan.FromDays(365)
                    });
            });

My intention is to extend the default time that the hangfire jobs are stored however while the code above just not give any errors, its not taking effect. How can I accomplish this goal?


3 Answer(s)
  • User Avatar
    0
    alper created
    Support Team

    hi

    there's an integration doc for hangfire. could you check if that helps you? <a class="postlink" href="https://aspnetboilerplate.com/Pages/Documents/Hangfire-Integration">https://aspnetboilerplate.com/Pages/Doc ... ntegration</a>

  • User Avatar
    0
    ervingayle created

    Thank you for the link. I did review it before posting here and tried setting the property as I noted in my original post which I found in the Hangfire documentation. However, it is not working for me so I posted here. Has anyone else tried to do this?

  • User Avatar
    0
    alper created
    Support Team

    do you think it's directly related to Aspnet Zero?

    it might be good to ask HangFire experts in their github issues. <a class="postlink" href="https://github.com/HangfireIO/Hangfire/issues">https://github.com/HangfireIO/Hangfire/issues</a>