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


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

    console.log "scheduling refresh after #{delay}"
    clearTimeout(@timeout) if @timeout
    @timeout = setTimeout(this.onTick.bind(this), delay)
    true

  element: ->

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




    url = $(@el).parent().data('refresh-url')
    delay = $(@el).data('refresh-delay')
    $.ajax(
      url:    url
      global: false
