{"id":19991571,"url":"https://github.com/hangfire-postgres/Hangfire.PostgreSql","last_synced_at":"2025-05-04T10:32:01.413Z","repository":{"id":1776106,"uuid":"26067699","full_name":"hangfire-postgres/Hangfire.PostgreSql","owner":"hangfire-postgres","description":"PostgreSql Storage Provider for Hangfire","archived":false,"fork":false,"pushed_at":"2025-04-29T11:40:03.000Z","size":4007,"stargazers_count":399,"open_issues_count":14,"forks_count":133,"subscribers_count":16,"default_branch":"master","last_synced_at":"2025-04-29T12:53:02.724Z","etag":null,"topics":["hangfire","postgresql","storage"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hangfire-postgres.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2014-11-02T00:51:12.000Z","updated_at":"2025-04-28T19:07:32.000Z","dependencies_parsed_at":"2023-02-18T08:30:45.109Z","dependency_job_id":"eee70ca4-2867-4406-a69e-5b8548605873","html_url":"https://github.com/hangfire-postgres/Hangfire.PostgreSql","commit_stats":null,"previous_names":["frankhommers/hangfire.postgresql"],"tags_count":59,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hangfire-postgres%2FHangfire.PostgreSql","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hangfire-postgres%2FHangfire.PostgreSql/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hangfire-postgres%2FHangfire.PostgreSql/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hangfire-postgres%2FHangfire.PostgreSql/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hangfire-postgres","download_url":"https://codeload.github.com/hangfire-postgres/Hangfire.PostgreSql/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252320468,"owners_count":21729131,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hangfire","postgresql","storage"],"created_at":"2024-11-13T04:51:48.903Z","updated_at":"2025-05-04T10:32:01.407Z","avatar_url":"https://github.com/hangfire-postgres.png","language":"C#","funding_links":[],"categories":["C\\#"],"sub_categories":[],"readme":"# Hangfire.PostgreSql\n\n[![Build status](https://github.com/hangfire-postgres/Hangfire.PostgreSql/actions/workflows/pack.yml/badge.svg)](https://github.com/hangfire-postgres/Hangfire.PostgreSql/actions/workflows/pack.yml) [![GitHub release (latest by date)](https://img.shields.io/github/v/release/hangfire-postgres/Hangfire.PostgreSql?label=Release)](https://github.com/hangfire-postgres/Hangfire.PostgreSql/releases/latest) [![Nuget](https://img.shields.io/nuget/v/Hangfire.PostgreSql?label=NuGet)](https://www.nuget.org/packages/Hangfire.PostgreSql)\n\nThis is an plugin to the Hangfire to enable PostgreSQL as a storage system.\nRead about hangfire here: https://github.com/HangfireIO/Hangfire#overview\nand here: http://hangfire.io/\n\n## Instructions\n\n### For .NET\n\nInstall Hangfire, see https://github.com/HangfireIO/Hangfire#installation\n\nDownload all files from this repository, add the Hangfire.PostgreSql.csproj to your solution.\nReference it in your project, and you are ready to go by using:\n\n```csharp\napp.UseHangfireServer(new BackgroundJobServerOptions(),\n  new PostgreSqlStorage(\"\u003cconnection string or its name\u003e\"));\napp.UseHangfireDashboard();\n```\n\n### For ASP.NET Core\n\nFirst, NuGet package needs installation.\n\n- Hangfire.AspNetCore\n- Hangfire.PostgreSql (Uses Npgsql 6)\n- Hangfire.PostgreSql.Npgsql5 (Uses Npgsql 5)\n\nHistorically both packages were functionally the same up until the package version 1.9.11, the only difference was the underlying Npgsql dependency version. Afterwards, the support for Npgsql v5 has been dropped and now minimum required version is 6.0.0.\n\nIn `Startup.cs` _ConfigureServices(IServiceCollection services)_ method add the following line:\n\n```csharp\nservices.AddHangfire(config =\u003e\n    config.UsePostgreSqlStorage(c =\u003e\n        c.UseNpgsqlConnection(Configuration.GetConnectionString(\"HangfireConnection\"))));\n```\n\nIn Configure method, add these two lines:\n\n```csharp\napp.UseHangfireServer();\napp.UseHangfireDashboard();\n```\n\nAnd... That's it. You are ready to go.\n\nIf you encounter any issues/bugs or have idea of a feature regarding Hangfire.Postgresql, [create us an issue](https://github.com/hangfire-postgres/Hangfire.PostgreSql/issues/new). Thanks!\n\n### Enabling SSL support\n\nSSL support can be enabled for Hangfire.PostgreSql library using the following mechanism:\n\n```csharp\nconfig.UsePostgreSqlStorage(c =\u003e\n    c.UseNpgsqlConnection(\n        Configuration.GetConnectionString(\"HangfireConnection\"), // connection string,\n        connection =\u003e // connection setup - gets called after instantiating the connection and before any calls to DB are made\n        {\n            connection.ProvideClientCertificatesCallback += clientCerts =\u003e\n            {\n                clientCerts.Add(X509Certificate.CreateFromCertFile(\"[CERT_FILENAME]\"));\n            };\n        }\n    )\n);\n```\n### Queue processing\n\nSimilar to `Hangfire.SqlServer`, queues are processed in alphabetical order. Given the following example\n\n```csharp\nvar options = new BackgroundJobServerOptions\n{\n    Queues = new[] { \"general-queue\", \"very-fast-queue\", \"a-long-running-queue\" }\n};\napp.UseHangfireServer(options);\n```\n\nthis provider would first process jobs in `a-long-running-queue`, then `general-queue` and lastly `very-fast-queue`.\n\n### License\n\nCopyright © 2014-2024 Frank Hommers https://github.com/hangfire-postgres/Hangfire.PostgreSql.\n\nCollaborators:\nFrank Hommers (frankhommers), Vytautas Kasparavičius (vytautask), Žygimantas Arūna (azygis) \n\nContributors:\nAndrew Armstrong (Plasma), Burhan Irmikci (barhun), Zachary Sims(zsims), kgamecarter, Stafford Williams (staff0rd), briangweber, Viktor Svyatokha (ahydrax), Christopher Dresel (Dresel), Vincent Vrijburg, David Roth (davidroth) and Ivan Tiniakov (Tinyakov).\n\nHangfire.PostgreSql is an Open Source project licensed under the terms of the LGPLv3 license. Please see http://www.gnu.org/licenses/lgpl-3.0.html for license text or COPYING.LESSER file distributed with the source code.\n\nThis work is based on the work of Sergey Odinokov, author of Hangfire. \u003chttp://hangfire.io/\u003e\n\n### Related Projects\n\n- [Hangfire.Core](https://github.com/HangfireIO/Hangfire)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhangfire-postgres%2FHangfire.PostgreSql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhangfire-postgres%2FHangfire.PostgreSql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhangfire-postgres%2FHangfire.PostgreSql/lists"}