 
   processMessages: ->
     unless @get('wait')
-      msg = @messageQueue.popObject()
-      if msg then @msgResponse(msg)
+      if msg = @messageQueue.popObject()
+        msg.data = JSON.parse(msg.data)
+        if @shouldProcessMessage(msg)
+          @msgResponse(msg.data)
     Ember.run.later(@, 'processMessages', [], interval)
+
+  shouldProcessMessage: (msg) ->
+    @get('eventNames').contains(msg.type) or msg.data.action == 'destroyed'
 
   pause: ->
     @set('wait', true)

    @get('eventSource').close() if @get('eventSource')

  resetChannels: ->
    @stop()
    params =
      url: '/event_stream'

      phase.get('tasks').addObject(task)
    if action == 'updated' && phase != oldPhase
      phase.get('tasks').addObject(task)
      oldPhase.get('tasks').removeObject(oldTask) if oldPhase
      task.set('phase', phase)

    task.triggerLater('didLoad')
