Hangfire configuration for Microsoft Azure Slot deployment

I am using hangfire with fire and forget feature (Enqueue) in my application. My application is deployed as AZURE APP SERVICE with SLOTS enabled.
I would like to know if there is any configuration to be done if i am using SLOT SWAP event during deployment

My Cofiguration:

services.AddHangfire(configuration => configuration
            .SetDataCompatibilityLevel(CompatibilityLevel.Version_170)
            .UseSimpleAssemblyNameTypeSerializer()
            .UseRecommendedSerializerSettings()
            .UseSqlServerStorage(config.GetConnectionString("DefaultConnection"),
                     new SqlServerStorageOptions
                             {
                                 CommandBatchMaxTimeout = TimeSpan.FromMinutes(5),
                                 SlidingInvisibilityTimeout = TimeSpan.FromMinutes(5),
                                 QueuePollInterval = TimeSpan.Zero,
                                 UseRecommendedIsolationLevel = true,
                                 DisableGlobalLocks = true
                             }));

services.AddHangfireServer();
1 Like