 
     url = $(@el).parent().data('refresh-url')
     delay = $(@el).data('refresh-delay')
-    console.log "refreshing from #{url}"
     $.ajax(
       url:    url
       global: false


  onReady: =>
    this.onTick()
    
    # @interval ||= window.setInterval this.onTick.bind(this), 5000

  onTick: =>
    clearTimeout(@timeout) if @timeout


    delay = $(@el).data('refresh-delay')

    clearTimeout(@timeout) if @timeout
    @timeout = setTimeout(this.onTick.bind(this), delay)
    true

$(document).ready (new BackgroundJobsUpdater).onReady


