Fix Worker.terminate()

This commit is contained in:
jeromewu
2020-03-24 02:42:59 +00:00
parent 906dcd369f
commit eef80a979f
13 changed files with 30 additions and 7 deletions

View File

@@ -148,12 +148,14 @@ module.exports = (_options = {}) => {
return run(`-f concat -safe 0 -i concat_list.txt ${opts} ${output}`, jobId);
};
const terminate = async (jobId) => {
const terminate = async () => {
if (worker !== null) {
/*
await startJob(createJob({
id: jobId,
action: 'terminate',
}));
*/
worker.terminate();
worker = null;
}