FIX: Ensure we have proper timeout for MiniRacer.

This commit is contained in:
Guo Xiang Tan 2018-06-11 08:40:05 +08:00
parent 2ec53a9628
commit e82d45b009

View File

@ -229,10 +229,10 @@ module JsLocaleHelper
def self.with_context
@mutex.synchronize do
yield @ctx ||= begin
ctx = MiniRacer::Context.new
ctx.load("#{Rails.root}/lib/javascripts/messageformat.js")
ctx
end
ctx = MiniRacer::Context.new(timeout: 15000)
ctx.load("#{Rails.root}/lib/javascripts/messageformat.js")
ctx
end
end
end