HangfireIO / HangfireIO/Hangfire

Do we have any plan for reusing existing database connections?

Open
#2,190 0 comments 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

Hi,

I saw some useful SqlServerStorage constructor in source code. For example, the constructor support existing connection:

![Screenshot_2](https://user-images.githubusercontent.com/1318911/232490373-ea713d5d-1c18-43a3-b9e3-5b3039a80046.png)

But no where used it in the source code. I think this is very useful because it allows me to reuse existing connections. From my understanding of the source code it establishes a new connection each time for a query right by using this code:

![Screenshot_3](https://user-images.githubusercontent.com/1318911/232490414-edd083db-0a02-436c-b762-9a0965811337.png)

So do we have any plan to publish that constructor for reusing existing connections? Or may I use any other ways to reuse existing connections?

Contributor guide

Open the contributing guide

Research direction

Start by inspecting the SqlServerStorage constructor and the source path that creates a connection for each query. Determine whether the existing-connection constructor is intended to be exposed and what reuse behavior would need to be supported; completion would require a decided API and documented or tested behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, sql
Domain
databases
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.