Auto-reload the page until it breaks
This commit is contained in:
parent
82258c5cc9
commit
c5c685317d
2 changed files with 4 additions and 2 deletions
app
|
@ -417,6 +417,7 @@ module.exports = class LevelLoader extends CocoClass
|
||||||
@supermodel.loadModel(model, resourceName)
|
@supermodel.loadModel(model, resourceName)
|
||||||
|
|
||||||
onSupermodelLoaded: ->
|
onSupermodelLoaded: ->
|
||||||
|
location.reload() unless @supermodel.failed
|
||||||
clearTimeout @loadTimeoutID
|
clearTimeout @loadTimeoutID
|
||||||
return if @destroyed
|
return if @destroyed
|
||||||
console.log 'SuperModel for Level loaded in', new Date().getTime() - @t0, 'ms' if LOG
|
console.log 'SuperModel for Level loaded in', new Date().getTime() - @t0, 'ms' if LOG
|
||||||
|
|
|
@ -305,7 +305,8 @@ class ModelResource extends Resource
|
||||||
timeToWait = 5000
|
timeToWait = 5000
|
||||||
tryLoad = =>
|
tryLoad = =>
|
||||||
return if this.isLoaded
|
return if this.isLoaded
|
||||||
if @loadsAttempted > 4
|
if @loadsAttempted > 0 # TODO: replace with 4
|
||||||
|
console.log "[remove] Didn't load model in #{timeToWait}ms (attempt ##{@loadsAttempted}), maybe trying again: ", _.result(@model, 'url')
|
||||||
@markFailed()
|
@markFailed()
|
||||||
return @
|
return @
|
||||||
@markLoading()
|
@markLoading()
|
||||||
|
|
Reference in a new issue