yuzd / Hangfire.HttpJob

httpjob for Hangfire,restful api for Hangfire,job调度与业务分离
https://github.com/yuzd/Hangfire.HttpJob/wiki
MIT License
635 stars 187 forks source link

mysql添加周期性作业的问题 #30

Closed xiaoxie1116 closed 4 years ago

xiaoxie1116 commented 4 years ago

用mysql添加周期性作业的时间,到了指定时间执行之后,就会一直不停的往表hangfire_set插数据,而且不删除任务就会一直往里面插数据

yuzd commented 4 years ago

能提供不停insert的数据是啥样的么?

xiaoxie1116 commented 4 years ago

已经解决了,是hangfire_set表没有设置外键关系:(具体的初始化脚本) CREATE TABLE hangfire_set ( Id int(11) NOT NULL AUTO_INCREMENT, Key varchar(100) NOT NULL, Value varchar(256) NOT NULL, Score float NOT NULL, ExpireAt datetime DEFAULT NULL, PRIMARY KEY (Id), UNIQUE KEY IX_Set_Key_Value (Key,Value) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

yuzd commented 4 years ago

ok