mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 18:03:43 +08:00
warm up v8 after fork
This commit is contained in:
parent
2d1d9a78b8
commit
6777bd2629
|
@ -164,5 +164,9 @@ before_fork do |server, worker|
|
|||
end
|
||||
|
||||
after_fork do |server, worker|
|
||||
# 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
|
||||
Discourse.after_fork
|
||||
PrettyText.cook("warm up **pretty text**")
|
||||
end
|
||||
|
|
|
@ -321,6 +321,9 @@ module Discourse
|
|||
# re-establish
|
||||
Sidekiq.redis = sidekiq_redis_config
|
||||
start_connection_reaper
|
||||
|
||||
# in case v8 was initialized we want to make sure it is nil
|
||||
PrettyText.reset_context
|
||||
nil
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user