Code Monkey home page Code Monkey logo

Comments (6)

yuzd avatar yuzd commented on June 7, 2024

i will see later

from hangfire.httpjob.

yuzd avatar yuzd commented on June 7, 2024

@xyz0822 i found same thing about DisableConcurrentExecution attribute
https://stackoverflow.com/questions/44447660/hangfire-disableconcurrentexecution-vs-worker-count-1

DisableConcurrentExecution is a per job attribute that ensures that two instances of the class/method name are not running at the same time

from hangfire.httpjob.

cjmld5 avatar cjmld5 commented on June 7, 2024

@yuzd 好像是同一个问题,hangfire控制并发用的数据库锁是根据job类的名称和方法名组成的字符串来的,如果这个锁加上jobid应该可以解决这个问题。
即{job.Type.ToGenericTypeString()}.{job.Method.Name}.{jobid}

from hangfire.httpjob.

yuzd avatar yuzd commented on June 7, 2024

@xyz0822 是加了DisableConcurrentExecution 的话 hangfire才会加锁对吧?

from hangfire.httpjob.

cjmld5 avatar cjmld5 commented on June 7, 2024

@xyz0822 是加了DisableConcurrentExecution 的话 hangfire才会加锁对吧?
是的,sqlserver数据库是通过存储过程来实现串行执行的,mysql有插件是通过数据库表distributedlock来实现

from hangfire.httpjob.

yuzd avatar yuzd commented on June 7, 2024

最新版本的已经规避了这个问题。因为采用了自定义的 加锁的key

from hangfire.httpjob.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.