Always subscribe to log updates
When the job is restart, we will not get any updates unless we're subscribed to job updates - that's why we need to subscribe even if the job is already finished. The other option to fix this would be to subscribe and unsubscribe also based on the status, but since subscribing to finished jobs does not cost us anything, I prefer the simpler solution.
This commit is contained in:
parent
d0998a8fc5
commit
972fb6fb43
|
@ -13,7 +13,7 @@ Travis.reopen
|
|||
job = @get('job')
|
||||
if job
|
||||
job.get('log').fetch()
|
||||
job.subscribe() if !job.get('isFinished')
|
||||
job.subscribe()
|
||||
|
||||
willDestroyElement: ->
|
||||
job = @get('job')
|
||||
|
@ -37,6 +37,11 @@ Travis.reopen
|
|||
@rerender() if @get('state') == 'inDOM'
|
||||
).observes('log.version')
|
||||
|
||||
logDidChange: (->
|
||||
console.log 'log view: log did change: rerender' if Log.DEBUG
|
||||
@rerender() if @get('state') == 'inDOM'
|
||||
).observes('log')
|
||||
|
||||
createEngine: ->
|
||||
console.log 'log view: create engine' if Log.DEBUG
|
||||
@scroll = new Log.Scroll
|
||||
|
|
Loading…
Reference in New Issue
Block a user