mirror of
https://github.com/discourse/discourse.git
synced 2024-11-29 08:03:47 +08:00
FEATURE: Add events when web and sidekiq forks start
This commit is contained in:
parent
d5e369d6cf
commit
15932f391e
|
@ -114,6 +114,8 @@ before_fork do |server, worker|
|
|||
|
||||
require 'demon/sidekiq'
|
||||
|
||||
DiscourseEvent.trigger(:sidekiq_fork_started)
|
||||
|
||||
if @stats_socket_dir
|
||||
Demon::Sidekiq.after_fork do
|
||||
start_stats_socket(server)
|
||||
|
@ -218,6 +220,8 @@ end
|
|||
after_fork do |server, worker|
|
||||
start_stats_socket(server)
|
||||
|
||||
DiscourseEvent.trigger(:web_fork_started)
|
||||
|
||||
# warm up v8 after fork, that way we do not fork a v8 context
|
||||
# it may cause issues if bg threads in a v8 isolate randomly stop
|
||||
# working due to fork
|
||||
|
|
Loading…
Reference in New Issue
Block a user