From 26016f48e2e6132facb091929d5b9cdd54a029f9 Mon Sep 17 00:00:00 2001 From: Nick Winter Date: Sun, 9 Feb 2014 18:44:31 -0800 Subject: [PATCH] Skip protectAPI for now. Defer worker termination until after it reports stats. --- app/lib/God.coffee | 6 ++++-- app/views/play/level/tome/tome_view.coffee | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app/lib/God.coffee b/app/lib/God.coffee index 27857224c..2555ee971 100644 --- a/app/lib/God.coffee +++ b/app/lib/God.coffee @@ -183,8 +183,10 @@ class Angel @started = null clearInterval @purgatoryTimer @purgatoryTimer = null - @worker?.terminate() - @worker = null + if @worker + worker = @worker + _.defer -> worker.terminate + @worker = null @ abort: -> diff --git a/app/views/play/level/tome/tome_view.coffee b/app/views/play/level/tome/tome_view.coffee index 8c12ae2f2..6b3084f48 100644 --- a/app/views/play/level/tome/tome_view.coffee +++ b/app/views/play/level/tome/tome_view.coffee @@ -89,7 +89,7 @@ module.exports = class TomeView extends View spellKey = pathComponents.join '/' @thangSpells[thang.id].push spellKey unless method.cloneOf - spell = @spells[spellKey] = new Spell programmableMethod: method, spellKey: spellKey, pathComponents: pathPrefixComponents.concat(pathComponents), session: @options.session, supermodel: @supermodel, skipFlow: @getQueryVariable("skip_flow") is "true", skipProtectAPI: @getQueryVariable("skip_protect_api") is "true" + spell = @spells[spellKey] = new Spell programmableMethod: method, spellKey: spellKey, pathComponents: pathPrefixComponents.concat(pathComponents), session: @options.session, supermodel: @supermodel, skipFlow: @getQueryVariable("skip_flow") is "true", skipProtectAPI: true #@getQueryVariable("skip_protect_api") is "true" for thangID, spellKeys of @thangSpells thang = world.getThangByID thangID if thang