From f69f225f65f3b7a9993a2d8874bcbfa691548f28 Mon Sep 17 00:00:00 2001 From: Guo Xiang Tan Date: Tue, 6 Sep 2016 14:02:08 +0800 Subject: [PATCH] FIX: Don't prevent unicorn worker from starting if warmup fails. --- config/unicorn.conf.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/config/unicorn.conf.rb b/config/unicorn.conf.rb index b364b45e9ea..74723ef125d 100644 --- a/config/unicorn.conf.rb +++ b/config/unicorn.conf.rb @@ -168,5 +168,10 @@ after_fork do |server, worker| # 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**") + + begin + PrettyText.cook("warm up **pretty text**") + rescue => e + Rails.logger.error("Failed to warm up pretty text: #{e}") + end end