@nexrender/worker 1.56.0 → 1.57.0
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 +3 -3
- package/src/bin.js +0 -0
- package/src/instance.js +7 -9
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nexrender/worker",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.57.0",
|
|
4
4
|
"author": "inlife",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"homepage": "https://www.nexrender.com",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@nexrender/api": "^1.50.1",
|
|
23
|
-
"@nexrender/core": "^1.
|
|
23
|
+
"@nexrender/core": "^1.57.0",
|
|
24
24
|
"@nexrender/types": "^1.45.6",
|
|
25
25
|
"arg": "^4.1.0",
|
|
26
26
|
"chalk": "^2.4.2",
|
|
@@ -29,5 +29,5 @@
|
|
|
29
29
|
"publishConfig": {
|
|
30
30
|
"access": "public"
|
|
31
31
|
},
|
|
32
|
-
"gitHead": "
|
|
32
|
+
"gitHead": "f46ff82538d354e060ed6797d97f19d1a96356cd"
|
|
33
33
|
}
|
package/src/bin.js
CHANGED
|
File without changes
|
package/src/instance.js
CHANGED
|
@@ -163,24 +163,22 @@ const createWorker = () => {
|
|
|
163
163
|
}
|
|
164
164
|
|
|
165
165
|
try {
|
|
166
|
-
currentJob.onRenderProgress = (
|
|
166
|
+
currentJob.onRenderProgress = ((c, s) => async (job) => {
|
|
167
167
|
try {
|
|
168
168
|
/* send render progress to our server */
|
|
169
|
-
|
|
169
|
+
await c.updateJob(job.uid, getRenderingStatus(job));
|
|
170
170
|
|
|
171
|
-
if (
|
|
172
|
-
|
|
171
|
+
if (s.onRenderProgress) {
|
|
172
|
+
s.onRenderProgress(job);
|
|
173
173
|
}
|
|
174
174
|
} catch (err) {
|
|
175
|
-
if (
|
|
175
|
+
if (s.stopOnError) {
|
|
176
176
|
throw err;
|
|
177
177
|
} else {
|
|
178
|
-
console.log(`[${
|
|
179
|
-
console.log(`[${currentJob.uid}] render proccess stopped with error...`)
|
|
180
|
-
console.log(`[${currentJob.uid}] continue listening next job...`)
|
|
178
|
+
console.log(`[${job.uid}] error updating job state occurred: ${err.stack}`)
|
|
181
179
|
}
|
|
182
180
|
}
|
|
183
|
-
}
|
|
181
|
+
})(client, settings);
|
|
184
182
|
|
|
185
183
|
currentJob.onRenderError = (currentJob, err /* on render error */) => {
|
|
186
184
|
currentJob.error = [].concat(currentJob.error || [], [err.toString()]);
|