CartoDB-SQL-API-1.47.2/batch/job_status.js

24 lines
471 B
JavaScript
Raw Normal View History

2023-05-07 23:04:18 +08:00
'use strict';
var JOB_STATUS_ENUM = {
PENDING: 'pending',
RUNNING: 'running',
DONE: 'done',
CANCELLED: 'cancelled',
FAILED: 'failed',
SKIPPED: 'skipped',
UNKNOWN: 'unknown'
};
module.exports = JOB_STATUS_ENUM;
var finalStatus = [
JOB_STATUS_ENUM.CANCELLED,
JOB_STATUS_ENUM.DONE,
JOB_STATUS_ENUM.FAILED,
JOB_STATUS_ENUM.UNKNOWN
];
module.exports.isFinal = function(status) {
return finalStatus.indexOf(status) !== -1;
};