One resolver in my Graphql is getting job status using GetConnection
Dictionary<string, string> result == null;
using (var connection = JobStorage.Current.GetConnection()) {
result = connection.GetAllEntriesFromHash($"recurring-job:{schedule_guid}");
}
… process result
The connection is created and disposed… Isn`t it better to have connection manager to manage only one connection … Ann if is not opened open it if is quiet close it… And pass all this methods behid this fascade…
Because I call this from API to get specific task status and if there will be 1000 concurrent request == 1000 connections… DB will block in about 100 open…
Should i create my custom Facade to manage one connection as wrapper around GetConnection() or is there any other workaround ?