Allows to manage background jobs.

Parameters 

Name TypeDescription
cbfunction

callback function

l_minteger

last modified date

etagstring

unique call indetificator

Example

this.mqReq = function(cb, l_m, etag) {
  var self = this;
  if ( typeof token == 'undefined' ) {
    throw new Error('Not authorized');
  }
  var headers = {};
  if ( typeof l_m !== 'undefined') {
    headers['If-Modified-Since'] = l_m;
  }
  if( typeof etag !== 'undefined'){
    headers['If-None-Match'] = etag;
  }
  return _requestFunction( url + '/mq/req' , 'GET', headers , {id : token}, function( xhr ){
    // Restart itself, except when aborted (status == 0)
    if (xhr.status) {
      if (xhr.status == 200) {
        timeout = 0;
      } else {
        timeout += 1000;
      }
      setTimeout(function() {
      return self.mqReq( cb, xhr.getResponseHeader('Last-Modified'), xhr.getResponseHeader('Etag') );
          }, timeout);
    }
    cb( xhr );
  });
};