     onlyOne = (w for w,x of jobInfo.workers).length == 1
     jobInfo.workers[data.from].active = true
     jobInfo.workers[data.from].visible = true if onlyOne
-    flushWorkers()
+    flushWorkers(data.from,jobInfo.workers[data.from])
     $('td.tsourceNum').text (w for w,x of jobInfo.workers when x.active).length
     if (w for w,x of jobInfo.workers when x.active).length > 0
       $('td.tstate').text 'running...'

    console.log "worker lost",data
    for w,x of jobInfo.workers
      x.active = false if w == data.from
    flushWorkers()
    $('td.tsourceNum').text (w for w,x of jobInfo.workers when x.active).length
    if (w for w,x of jobInfo.workers when x.active).length > 0
      $('td.tstate').text 'running...'

      id = $(this).attr('id')
      if id and jobInfo.workers[id]
        jobInfo.workers[id].visible = false
        flushWorkers(id,jobInfo.workers[id])
    $('input.worker-visible').off('change').on 'change', ->
      id = $(this).attr('name')
      if id and jobInfo.workers[id]
        jobInfo.workers[id].visible = $(this).is(':checked')
        flushWorkers(id,jobInfo.workers[id])

    if jobInfo.socket
      attachList = (w for w,x of jobInfo.workers when x.visible)
