All Projects → stulzq → Hangfire.mysql.core

stulzq / Hangfire.mysql.core

Licence: gpl-2.0
Hangfire Mysql storage components, support for. NET core 1.1,. NET core 2.0,. NET standard 2.0. Based on Hangfire.MySqlStorage, some bugs were fixed and .NET standard 2.0 support was provided.

Labels

Projects that are alternatives of or similar to Hangfire.mysql.core

Cetus
Cetus is a high performance middleware that provides transparent routing between your application and any backend MySQL Servers.
Stars: ✭ 1,199 (+1344.58%)
Mutual labels:  mysql
Olog
📔 Online Note-Taking Experience | 即时灵感笔记记录平台
Stars: ✭ 79 (-4.82%)
Mutual labels:  mysql
Mysqltuner
MySQL Tuner for Windows
Stars: ✭ 81 (-2.41%)
Mutual labels:  mysql
Laravel Log To Db
Custom Laravel and Lumen 5.6+ Log channel handler that can store log events to SQL or MongoDB databases. Uses Laravel/Monolog native logging functionality.
Stars: ✭ 76 (-8.43%)
Mutual labels:  mysql
Bbs node
node后端服务,node+express+mysql, 搭建token-权限-管理完整的web服务, 对应页面: https://www.lyh.red/admin \ https://www.lyh.red/bbs \ 接口地址https://www.lyh.red/apidoc/index.html
Stars: ✭ 78 (-6.02%)
Mutual labels:  mysql
Agent
The best way to backup and restore your database
Stars: ✭ 80 (-3.61%)
Mutual labels:  mysql
Sql to sqlalchemy
本教程是为了展现 sql 原始语句转换为 sqlalchemy 语句的各个实例。
Stars: ✭ 75 (-9.64%)
Mutual labels:  mysql
Chloe
A lightweight and high-performance Object/Relational Mapping(ORM) library for .NET --C#
Stars: ✭ 1,248 (+1403.61%)
Mutual labels:  mysql
Shorty
🔗 A URL shortening service built using Flask and MySQL
Stars: ✭ 78 (-6.02%)
Mutual labels:  mysql
Sql
MySQL & PostgreSQL pipe
Stars: ✭ 81 (-2.41%)
Mutual labels:  mysql
Node Sql Fixtures
SQL fixtures for Node.js in PostgreSQL, MySQL, MariaDB and SQLite
Stars: ✭ 76 (-8.43%)
Mutual labels:  mysql
Ycsocket
基于swoole的socket框架,支持协程版MySQL、Redis连接池,已用于大型RPG游戏服务端
Stars: ✭ 77 (-7.23%)
Mutual labels:  mysql
Dble Docs Cn
Documents for dble in Chinese
Stars: ✭ 80 (-3.61%)
Mutual labels:  mysql
Bige
游戏服务器框架。
Stars: ✭ 76 (-8.43%)
Mutual labels:  mysql
Archer
基于inception的自动化SQL操作平台,支持SQL执行、LDAP认证、发邮件、OSC、SQL查询、SQL优化建议、权限管理等功能,支持docker镜像
Stars: ✭ 1,239 (+1392.77%)
Mutual labels:  mysql
Wtcms
基于thinkphp的内容管理系统,可快速搭建个人博客、公司学校官网、新闻类站点。
Stars: ✭ 75 (-9.64%)
Mutual labels:  mysql
Sqlite3 To Mysql
Transfer data from SQLite to MySQL
Stars: ✭ 79 (-4.82%)
Mutual labels:  mysql
Gh Ost
GitHub's Online Schema Migrations for MySQL
Stars: ✭ 9,523 (+11373.49%)
Mutual labels:  mysql
Butterfly
🔥 蝴蝶--【简单】【稳定】【好用】的 Python web 框架🦋 除 Python 2.7,无其他依赖; 🦋 butterfly 是一个 RPC 风格 web 框架,同时也是微服务框架,自带消息队列通信机制实现分布式
Stars: ✭ 82 (-1.2%)
Mutual labels:  mysql
Student Homework Management System
使用SSM+Shiro开发的学生作业管理系统。支持批量打包下载,QQ登陆等功能 生产版:
Stars: ✭ 79 (-4.82%)
Mutual labels:  mysql

This project is no longer maintained, please use https://github.com/arnoldasgudas/Hangfire.MySqlStorage

Hangfire.MySql.Core Implementation

Hangfire.MySql.Core is based on Hangfire.MySqlStorage(https://github.com/arnoldasgudas/Hangfire.MySqlStorage)

I fix some bug and support .net standard 2.0

Latest version

MySql storage implementation of Hangfire - fire-and-forget, delayed and recurring tasks runner for .NET. Scalable and reliable background job runner. Supports multiple servers, CPU and I/O intensive, long-running and short-running jobs.

Now, support table prefix

services.AddHangfire(x => x.UseStorage(new MySqlStorage(Configuration.GetConnectionString("Hangfire"),new MySqlStorageOptions(){TablePrefix = "Custom"})));

Installation

Install MySQL

Run the following command in the NuGet Package Manager console to install Hangfire.MySql.Core:

Install-Package Hangfire.MySql.Core

Usage

Use one the following ways to initialize MySqlStorage:

  • Create new instance of MySqlStorage with connection string constructor parameter and pass it to Configuration with UseStorage method:
  GlobalConfiguration.Configuration.UseStorage(
    new MySqlStorage(connectionString));
  • There must be Allow User Variables set to true in the connection string. For example: server=127.0.0.1;uid=root;pwd=root;database={0};Allow User Variables=True
  • Alternatively one or more options can be passed as a parameter to MySqlStorage:
GlobalConfiguration.Configuration.UseStorage(
    new MySqlStorage(
        connectionString, 
        new MySqlStorageOptions
        {
            TransactionIsolationLevel = IsolationLevel.ReadCommitted,
            QueuePollInterval = TimeSpan.FromSeconds(15),
            JobExpirationCheckInterval = TimeSpan.FromHours(1),
            CountersAggregateInterval = TimeSpan.FromMinutes(5),
            PrepareSchemaIfNecessary = true,
            DashboardJobListLimit = 50000,
            TransactionTimeout = TimeSpan.FromMinutes(1),
            TablePrefix = "Hangfire"
        }));

Description of optional parameters:

  • TransactionIsolationLevel - transaction isolation level. Default is read committed.
  • QueuePollInterval - job queue polling interval. Default is 15 seconds.
  • JobExpirationCheckInterval - job expiration check interval (manages expired records). Default is 1 hour.
  • CountersAggregateInterval - interval to aggregate counter. Default is 5 minutes.
  • PrepareSchemaIfNecessary - if set to true, it creates database tables. Default is true.
  • DashboardJobListLimit - dashboard job list limit. Default is 50000.
  • TransactionTimeout - transaction timeout. Default is 1 minute.

How to limit number of open connections

Number of opened connections depends on Hangfire worker count. You can limit worker count by setting WorkerCount property value in BackgroundJobServerOptions:

app.UseHangfireServer(
   new BackgroundJobServerOptions
   {
      WorkerCount = 1
   });

More info: http://hangfire.io/features.html#concurrency-level-control

Dashboard

Hangfire provides a dashboard Dashboard More info: Hangfire Overview

Build

Please use Visual Studio or any other tool of your choice to build the solution

Test

In order to run unit tests and integrational tests set the following variables in you system environment variables (restart of Visual Studio is required):

Hangfire_SqlServer_ConnectionStringTemplate (default: server=127.0.0.1;uid=root;pwd=root;database={0};Allow User Variables=True)

Hangfire_SqlServer_DatabaseName (default: Hangfire.MySql.Tests)

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].