early return in event of bad network response
This commit is contained in:
1 parent
fd1edf9651
commit
7651596617
1 file changed
+9
-1
@@ -258,8 +258,16 @@ class JobQueueHelper {
|
|||||||
job.data.type === "distributed_http" ||
|
job.data.type === "distributed_http" ||
|
||||||
job.data.type === "distributed_test"
|
job.data.type === "distributed_test"
|
||||||
) {
|
) {
|
||||||
return;
|
await job.updateProgress(100);
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If the network response is not found, we're done
|
||||||
|
if (!networkResponse) {
|
||||||
|
await job.updateProgress(100);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
// Handle status change
|
// Handle status change
|
||||||
await job.updateProgress(60);
|
await job.updateProgress(60);
|
||||||
const { monitor, statusChanged, prevStatus } =
|
const { monitor, statusChanged, prevStatus } =
|
||||||
|
|||||||
Reference in new issue
Block a user