@nexrender/worker 1.56.1 → 1.57.2
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 +5 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nexrender/worker",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.57.2",
|
|
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.2",
|
|
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": "6bd59c768562a28066da1b4cd6e7377d16b96e39"
|
|
33
33
|
}
|
package/src/bin.js
CHANGED
|
File without changes
|
package/src/instance.js
CHANGED
|
@@ -163,10 +163,10 @@ const createWorker = () => {
|
|
|
163
163
|
}
|
|
164
164
|
|
|
165
165
|
try {
|
|
166
|
-
currentJob.onRenderProgress = ((c, s) => (job) => {
|
|
166
|
+
currentJob.onRenderProgress = ((c, s) => async (job) => {
|
|
167
167
|
try {
|
|
168
168
|
/* send render progress to our server */
|
|
169
|
-
c.updateJob(job.uid, getRenderingStatus(job));
|
|
169
|
+
await c.updateJob(job.uid, getRenderingStatus(job));
|
|
170
170
|
|
|
171
171
|
if (s.onRenderProgress) {
|
|
172
172
|
s.onRenderProgress(job);
|
|
@@ -175,9 +175,7 @@ const createWorker = () => {
|
|
|
175
175
|
if (s.stopOnError) {
|
|
176
176
|
throw err;
|
|
177
177
|
} else {
|
|
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...`)
|
|
178
|
+
console.log(`[${job.uid}] error updating job state occurred: ${err.stack}`)
|
|
181
179
|
}
|
|
182
180
|
}
|
|
183
181
|
})(client, settings);
|
|
@@ -187,6 +185,8 @@ const createWorker = () => {
|
|
|
187
185
|
|
|
188
186
|
if (settings.onRenderError) {
|
|
189
187
|
settings.onRenderError(currentJob, err);
|
|
188
|
+
} else {
|
|
189
|
+
throw err;
|
|
190
190
|
}
|
|
191
191
|
}
|
|
192
192
|
|