mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 22:05:48 +08:00
1d024f77a6
This allows plugins to call `register_demon_process` with a Class inheriting from Demon::Base. The unicorn master process will take care of spawning, monitoring and restarting the process. This API should be used with extreme caution, but it is significantly cleaner than spawning processes/threads in an `after_initialize` block. This commit also cleans up the demon spawning logging so that it uses the same format as unicorn worker logging. It also switches to the block form of `fork` to ensure that Demons exit after running, rather than returning execution to where the fork took place. |
||
---|---|---|
.. | ||
base.rb | ||
email_sync.rb | ||
rails_autospec.rb | ||
sidekiq.rb |