HangfireIO / HangfireIO/Hangfire

Feature request: Support for max retries via API instead of attribute

Open
#2,216 1 comment 5 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
10.1k
Forks
1.8k
Avg merge
1h 19m
Merged PRs (30d)
1

Description

Since Hangfire 1.8 it is possible to enqueue a job directly with a specified JobQueue without the `Queue` attribute. Would it be possible to also make an option to specify the max amount of retries so we don't have to use the `AutomaticRetry` attribute?

In my project, Hangfire is completely hidden for the rest of the application with reverse DI so that only my own background job client knows about Hangfire. The only thing currently in my way to completely make my application unaware of Hangfire is the `AutomaticRetry` attribute attribute.

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the existing enqueue API that accepts a JobQueue and the AutomaticRetry attribute behavior. Determine how a caller could provide a maximum retry count without referencing Hangfire attributes; done means the retry limit can be supplied through the API while preserving the expected retry behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
backend, backend-api-design
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.