Added debug info.
This commit is contained in:
parent
c279e6f5cf
commit
32143167d8
1 changed files with 10 additions and 17 deletions
|
@ -68,7 +68,6 @@ class _taskManagerSingleton extends App.Controller
|
|||
@workersStarted = {}
|
||||
@allTasks = []
|
||||
@tasksToUpdate = {}
|
||||
@initialLoad = true
|
||||
@activeTask = undefined
|
||||
@tasksInitial()
|
||||
|
||||
|
@ -76,8 +75,6 @@ class _taskManagerSingleton extends App.Controller
|
|||
App.Event.bind(
|
||||
'auth:login'
|
||||
=>
|
||||
@initialLoad = true
|
||||
@all()
|
||||
@tasksInitial()
|
||||
'task'
|
||||
)
|
||||
|
@ -95,13 +92,6 @@ class _taskManagerSingleton extends App.Controller
|
|||
|
||||
all: ->
|
||||
|
||||
# initial load of taskbar collection
|
||||
if @initialLoad
|
||||
@initialLoad = false
|
||||
tasks = App.Taskbar.all()
|
||||
for task in tasks
|
||||
@allTasks.push task.attributes()
|
||||
|
||||
# sort by prio
|
||||
@allTasks = _(@allTasks).sortBy( (task) ->
|
||||
return task.prio;
|
||||
|
@ -316,7 +306,7 @@ class _taskManagerSingleton extends App.Controller
|
|||
@allTasks = []
|
||||
@activeTask = undefined
|
||||
|
||||
# clear inmem tasks
|
||||
# clear in mem tasks
|
||||
App.Taskbar.deleteAll()
|
||||
|
||||
# rerender task bar
|
||||
|
@ -348,6 +338,7 @@ class _taskManagerSingleton extends App.Controller
|
|||
if ui.tasksToUpdate[ @key ] is 'inProgress'
|
||||
delete ui.tasksToUpdate[ @key ]
|
||||
error: (task) =>
|
||||
ui.log 'error', "can't update task '#{task.id}'"
|
||||
if ui.tasksToUpdate[ @key ] is 'inProgress'
|
||||
delete ui.tasksToUpdate[ @key ]
|
||||
)
|
||||
|
@ -371,17 +362,19 @@ class _taskManagerSingleton extends App.Controller
|
|||
|
||||
tasksInitial: =>
|
||||
|
||||
# initial load of taskbar collection
|
||||
tasks = App.Taskbar.all()
|
||||
@allTasks = []
|
||||
for task in tasks
|
||||
@allTasks.push task.attributes()
|
||||
|
||||
# reopen tasks
|
||||
App.Event.trigger 'taskbar:init'
|
||||
|
||||
# check if we have different
|
||||
|
||||
tasks = @all()
|
||||
return if !tasks
|
||||
|
||||
task_count = 0
|
||||
for task in tasks
|
||||
for task in @allTasks
|
||||
task_count += 1
|
||||
console.log('START', task)
|
||||
App.Delay.set(
|
||||
=>
|
||||
task = tasks.shift()
|
||||
|
|
Loading…
Reference in a new issue