HangfireIO / HangfireIO/Hangfire

Hangfire.SqlServer no job foreign key relation in JobQueue table

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

Description

Hangfire.Core: 1.6.8
Hangfire.SqlServer: 1.6.8

After deleting all jobs from the Job table I detected that the job queue was not cleared.
The BackgroundJobServer keeps trying to retrieve the not existing jobs.
Is there a reason this column does not have a foreign key? If not, can you please add it?

Contributor guide

Open the contributing guide

Research direction

Inspect the Hangfire.SqlServer schema and migrations for the Job and JobQueue tables, then reproduce deleting all jobs while a BackgroundJobServer is running. Determine the intended relationship and verify that the resulting schema and deletion behavior no longer leave queue entries for missing jobs.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
backend, databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.