mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-02-25 22:14:29 -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...)
|
super(arguments...)
|
||||||
@changedSessionProperties = {}
|
@changedSessionProperties = {}
|
||||||
if document.location.href.search('codecombat.com') isnt -1
|
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
|
else
|
||||||
@saveSession = _.debounce(@reallySaveSession, 1000, {maxWait: 5000}) # Not this fast during HoC
|
@saveSession = _.debounce(@reallySaveSession, 1000, {maxWait: 5000}) # Save quickly in development.
|
||||||
@playerIsIdle = false
|
@playerIsIdle = false
|
||||||
|
|
||||||
init: ->
|
init: ->
|
||||||
|
|
|
@ -733,9 +733,6 @@ module.exports = class SpellView extends CocoView
|
||||||
hashValue = aether.raw + aetherProblem.message
|
hashValue = aether.raw + aetherProblem.message
|
||||||
return if hashValue of @savedProblems
|
return if hashValue of @savedProblems
|
||||||
@savedProblems[hashValue] = true
|
@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
|
# Save new problem
|
||||||
@userCodeProblem = new UserCodeProblem()
|
@userCodeProblem = new UserCodeProblem()
|
||||||
|
|
Loading…
Reference in a new issue