@nexrender/core 1.54.3 → 1.54.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/src/tasks/render.js +25 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nexrender/core",
|
|
3
|
-
"version": "1.54.
|
|
3
|
+
"version": "1.54.4",
|
|
4
4
|
"main": "src/index.js",
|
|
5
5
|
"author": "Inlife",
|
|
6
6
|
"homepage": "https://www.nexrender.com",
|
|
@@ -41,5 +41,5 @@
|
|
|
41
41
|
"publishConfig": {
|
|
42
42
|
"access": "public"
|
|
43
43
|
},
|
|
44
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "a24bdf4c6f52af40da51039a71b6a7d07b373f2e"
|
|
45
45
|
}
|
package/src/tasks/render.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const fs = require('fs')
|
|
2
2
|
const path = require('path')
|
|
3
|
-
const {spawn} = require('child_process')
|
|
3
|
+
const {spawn, exec} = require('child_process')
|
|
4
4
|
const {expandEnvironmentVariables, checkForWSL} = require('../helpers/path')
|
|
5
5
|
|
|
6
6
|
const translations = {
|
|
@@ -36,6 +36,29 @@ const crossPlatformKill = (instance) => {
|
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
+
function killProcessByName(settings, processName) {
|
|
40
|
+
if (process.platform !== 'win32') {
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
const command = `taskkill /IM ${processName} /F`;
|
|
45
|
+
|
|
46
|
+
exec(command, (error, stdout, stderr) => {
|
|
47
|
+
if (error) {
|
|
48
|
+
settings.logger.log(`Error killing process: ${error.message}`);
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
if (stderr) {
|
|
53
|
+
settings.logger.log(`Error: ${stderr}`);
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
settings.logger.log(`Process ${processName} killed successfully.`);
|
|
58
|
+
settings.logger.log(stdout);
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
|
|
39
62
|
/**
|
|
40
63
|
* This task creates rendering process
|
|
41
64
|
*/
|
|
@@ -271,6 +294,7 @@ Estimated date of change to the new behavior: 2023-06-01.\n`);
|
|
|
271
294
|
settings.trackSync('Job Render Failed', { job_id: job.uid, error: 'aerender_timeout' });
|
|
272
295
|
reject(new Error(`Maximum rendering time exceeded`));
|
|
273
296
|
crossPlatformKill(instance)
|
|
297
|
+
killProcessByName('AfterFX.com')
|
|
274
298
|
},
|
|
275
299
|
timeout
|
|
276
300
|
);
|