HangfireIO / Hangfire

An easy way to perform background job processing in .NET and .NET Core applications. No Windows Service or separate process required
https://www.hangfire.io
Other
9.29k stars 1.69k forks source link

Queue Name length greater than 20 characters -> silently fails to run #950

Open JPraeses opened 7 years ago

JPraeses commented 7 years ago

When we give Hangfire a queue name that is longer than 20 characters:

Expected behavior:

Note: Different Hangfire versions and storage mechanisms may support different queue name lengths (see #369 and #376)

Hangfire.Core 1.6.12

Hangfire.PostgreSql 1.4.3

Our setup looks like:

PostgreSqlBootstrapperConfigurationExtensions.UsePostgreSqlStorage(
    (GlobalConfiguration)GlobalConfiguration.Configuration,
    "primaryConnection");
GlobalJobFilters.Filters.Add(new AutomaticRetryAttribute { Attempts = 2 });
GlobalJobFilters.Filters.Add(new QueueAttribute(importQueueName));
GlobalJobFilters.Filters.Add(new QueueAttribute(exportQueueName));
GlobalJobFilters.Filters.Add(new RaygunLogger());

_backgroundJobServer = new BackgroundJobServer(new BackgroundJobServerOptions
{
    Queues = new[] { importQueueName, exportQueueName}
});
var importChron = ConfigurationManager.AppSettings["importScheduleCron"];
RecurringJob.AddOrUpdate<JobRunner>("ImportProcessorJob", j => j.Execute(),
    importChron,
    queue: importQueueName,
    timeZone: TimeZoneInfo.Local);

var exportChron = ConfigurationManager.AppSettings["exportScheduleCron"];
RecurringJob.AddOrUpdate<ExportRequestProcessor>("ExportProcessorJob", j=> j.Execute(),
    exportChron,
    queue: exportQueueName,
    timeZone: TimeZoneInfo.Local);
nklyshko commented 6 months ago

Related to #2290