Save more UserCodeProblems and LevelSessions.

This commit is contained in:
Nick Winter 2015-01-06 13:03:09 -08:00
parent 677ba56ce9
commit 9a3f18e60a
2 changed files with 2 additions and 5 deletions

View file

@ -30,9 +30,9 @@ module.exports = class LevelBus extends Bus
super(arguments...)
@changedSessionProperties = {}
if document.location.href.search('codecombat.com') isnt -1
@saveSession = _.debounce(@reallySaveSession, 10000, {maxWait: 30000}) # Save us during HoC
@saveSession = _.debounce(@reallySaveSession, 4000, {maxWait: 10000}) # Save slower on production.
else
@saveSession = _.debounce(@reallySaveSession, 1000, {maxWait: 5000}) # Not this fast during HoC
@saveSession = _.debounce(@reallySaveSession, 1000, {maxWait: 5000}) # Save quickly in development.
@playerIsIdle = false
init: ->

View file

@ -733,9 +733,6 @@ module.exports = class SpellView extends CocoView
hashValue = aether.raw + aetherProblem.message
return if hashValue of @savedProblems
@savedProblems[hashValue] = true
if Math.random() > 0.01
# Let's only save a tiny fraction of these during HoC to reduce writes.
return
# Save new problem
@userCodeProblem = new UserCodeProblem()