Skip to content

Commit

Permalink
fixed crash on update
Browse files Browse the repository at this point in the history
  • Loading branch information
inlife committed Oct 18, 2024
1 parent 08af86c commit 194a904
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
Empty file modified packages/nexrender-worker/src/bin.js
100644 → 100755
Empty file.
8 changes: 3 additions & 5 deletions packages/nexrender-worker/src/instance.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,10 +163,10 @@ const createWorker = () => {
}

try {
currentJob.onRenderProgress = ((c, s) => (job) => {
currentJob.onRenderProgress = ((c, s) => async (job) => {
try {
/* send render progress to our server */
c.updateJob(job.uid, getRenderingStatus(job));
await c.updateJob(job.uid, getRenderingStatus(job));

if (s.onRenderProgress) {
s.onRenderProgress(job);
Expand All @@ -175,9 +175,7 @@ const createWorker = () => {
if (s.stopOnError) {
throw err;
} else {
console.log(`[${job.uid}] error occurred: ${err.stack}`)
console.log(`[${job.uid}] render proccess stopped with error...`)
console.log(`[${job.uid}] continue listening next job...`)
console.log(`[${job.uid}] error updating job state occurred: ${err.stack}`)
}
}
})(client, settings);
Expand Down

0 comments on commit 194a904

Please sign in to comment.