mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-27 17:45:40 -05:00
Save more UserCodeProblems and LevelSessions.
This commit is contained in:
parent
677ba56ce9
commit
9a3f18e60a
2 changed files with 2 additions and 5 deletions
|
@ -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: ->
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue