                 delete @models.resourceUsage
 
     refresh: ->
+        @resourcesFetched = false
+
         @models.task.fetch()
             .done =>
                 @fetchResourceUsage() if @models.task.get('isStillRunning')


        app.showView @view

        #  Refresh once again on page load to calculate initial CPU Usage value
        @initialPageLoad = true
        if @initialPageLoad
            setTimeout (=>
                @refresh() 
                @initialPageLoad = false
            ), 2000

    fetchResourceUsage: ->
        @models.resourceUsage?.fetch()

                # Store current resource usage to compare against future resource usage
                @models.resourceUsage.setCpuUsage() if @models.resourceUsage.get('previousUsage')              
                @models.resourceUsage.set('previousUsage', @models.resourceUsage.toJSON())
                
                if not @resourcesFetched
                    setTimeout (=> @fetchResourceUsage() ), 2000
                    @resourcesFetched = true

            .error =>
                # If this 404s there's nothing to get so don't bother
