@nexrender/worker 1.56.0 → 1.56.1
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/instance.js +9 -9
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nexrender/worker",
|
|
3
|
-
"version": "1.56.
|
|
3
|
+
"version": "1.56.1",
|
|
4
4
|
"author": "inlife",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"homepage": "https://www.nexrender.com",
|
|
@@ -29,5 +29,5 @@
|
|
|
29
29
|
"publishConfig": {
|
|
30
30
|
"access": "public"
|
|
31
31
|
},
|
|
32
|
-
"gitHead": "
|
|
32
|
+
"gitHead": "08af86cf1867fc7299add1a8c9afd3bccadeb623"
|
|
33
33
|
}
|
package/src/instance.js
CHANGED
|
@@ -163,24 +163,24 @@ const createWorker = () => {
|
|
|
163
163
|
}
|
|
164
164
|
|
|
165
165
|
try {
|
|
166
|
-
currentJob.onRenderProgress = (
|
|
166
|
+
currentJob.onRenderProgress = ((c, s) => (job) => {
|
|
167
167
|
try {
|
|
168
168
|
/* send render progress to our server */
|
|
169
|
-
|
|
169
|
+
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(`[${
|
|
180
|
-
console.log(`[${
|
|
178
|
+
console.log(`[${job.uid}] error occurred: ${err.stack}`)
|
|
179
|
+
console.log(`[${job.uid}] render proccess stopped with error...`)
|
|
180
|
+
console.log(`[${job.uid}] continue listening next job...`)
|
|
181
181
|
}
|
|
182
182
|
}
|
|
183
|
-
}
|
|
183
|
+
})(client, settings);
|
|
184
184
|
|
|
185
185
|
currentJob.onRenderError = (currentJob, err /* on render error */) => {
|
|
186
186
|
currentJob.error = [].concat(currentJob.error || [], [err.toString()]);
|