This repository was archived by the owner on Jun 6, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -233,7 +233,7 @@ function create(params, cb) {
233233 if ( ! res . state ) return new Error ( 'Job state not found.' ) ;
234234 var state = res . state ;
235235 console . log ( 'Job ' + state ) ;
236- if ( state !== 'Stopped' && state !== 'Failed' && state !== 'Running' ) {
236+ if ( state !== 'Stopped' && state !== 'Failed' && state !== 'Cancelled' && state !== ' Running') {
237237 if ( state === 'Error' || res . jobError ) console . log ( 'Error: ' + res . jobError ) ;
238238 return cb ( ) ;
239239 }
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ var assign = require('lodash.assign');
1515 * - Stopped - the job finished with a job command exit code of 0
1616 * - Error - the job was unable to setup or run to normal completion
1717 * - Failed - the job finished but the job command exit code was non-zero
18+ * - Cancelled - the job was manual stopped before completion
1819 *
1920 * When the callback is called, the returned object will be information about the job.
2021 * @param {object } params - Job waitfor parameters
@@ -101,7 +102,8 @@ function waitfor(params, cb) {
101102 ( job . state === 'Running' && params . state === 'Pending' ) ||
102103 job . state === 'Error' ||
103104 job . state === 'Stopped' ||
104- job . state === 'Failed' ) {
105+ job . state === 'Failed' ||
106+ job . state === 'Cancelled' ) {
105107 return cb ( null , job ) ;
106108 }
107109 var interval = setTimeout ( function _interval ( ) {
You can’t perform that action at this time.
0 commit comments