rufus scheduler not running in production

前端 未结 2 937
醉酒成梦
醉酒成梦 2021-01-24 02:55

I have a rails server running under nginx & passenger. My sheduler.rb looks like this

require \'rufus-scheduler\'
my_awesome_job = Rufus::Schedu         


        
2条回答
  •  深忆病人
    2021-01-24 03:58

    Most likely, this problem is caused by the Rufus scheduler background thread being terminated after Phusion Passenger spawns a child process as part of the smart spawning method.

    Read Spawning methods explained. The specific issue you're suffering from is probably Smart spawning caveat #2: the need to revive threads.

    You need to revive the Rufus scheduler thread using the mechanism in the documentation. I'm not exactly sure which API call you need to make, so maybe you can ask the Rufus scheduler authors.

    Alternatively, you can use the 'direct' spawning method. It's less efficient but it avoids compatibility issues like this.

提交回复
热议问题