lib/main.js
function update_job(jobName, jobConfig, customParams, callback) {
      var _doArgs29 = doArgs(arguments, ['string', 'string', ['object', {}], 'function']);

      var _doArgs30 = _slicedToArray(_doArgs29, 4);

      jobName = _doArgs30[0];
      jobConfig = _doArgs30[1];
      customParams = _doArgs30[2];
      callback = _doArgs30[3];


      doRequest({
        method: 'POST',
        urlPattern: [JOB_CONFIG, jobName],
        request: {
          body: jobConfig,
          headers: { 'Content-Type': 'application/xml' }
        },
        noparse: true
      }, customParams, function (error, data) {
        if (error) {
          callback(error, data);
          return;
        }
        // TODO rather return job_info ???
        // const data = {name: jobName, location: response.headers['Location'] || response.headers['location']};
        callback(null, { name: jobName });
      });
    }
function update_job(jobName, jobConfig, customParams, callback) {
      var _doArgs29 = doArgs(arguments, ['string', 'string', ['object', {}], 'function']);

      var _doArgs30 = _slicedToArray(_doArgs29, 4);

      jobName = _doArgs30[0];
      jobConfig = _doArgs30[1];
      customParams = _doArgs30[2];
      callback = _doArgs30[3];


      doRequest({
        method: 'POST',
        urlPattern: [JOB_CONFIG, jobName],
        request: {
          body: jobConfig,
          headers: { 'Content-Type': 'application/xml' }
        },
        noparse: true
      }, customParams, function (error, data) {
        if (error) {
          callback(error, data);
          return;
        }
        // TODO rather return job_info ???
        // const data = {name: jobName, location: response.headers['Location'] || response.headers['location']};
        callback(null, { name: jobName });
      });
    }
function update_job ( jobName , jobConfig , customParams , callback ) { var _doArgs29 = doArgs ( arguments , [ 'string' , 'string' , [ 'object' , { } ] , 'function' ] ) ; var _doArgs30 = _slicedToArray ( _doArgs29 , 4 ) ; jobName = _doArgs30 [ 0 ] ; jobConfig = _doArgs30 [ 1 ] ; customParams = _doArgs30 [ 2 ] ; callback = _doArgs30 [ 3 ] ; doRequest ( { method : 'POST' , urlPattern : [ JOB_CONFIG , jobName ] , request : { body : jobConfig , headers : { 'Content-Type' : 'application/xml' } } , noparse : true } , customParams , function ( error , data ) { if ( error ) { callback ( error , data ) ; return ; } // TODO rather return job_info ??? // const data = {name: jobName, location: response.headers['Location'] || response.headers['location']}; callback ( null , { name : jobName } ) ; } ) ; }
Update a existing job based on a jobConfig xml string
Update a existing job based on a jobConfig xml string