Skip to content

Commit

Permalink
Restore await
Browse files Browse the repository at this point in the history
  • Loading branch information
k1o0 committed Aug 12, 2022
1 parent 9e5d801 commit 2f163d6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib.js
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ async function shortCircuit(job, func = null) {
// If lazy, load records to check whether we already have the results saved
if (job.data.force === false) { // NB: Strict equality; force by default
_log('Updating job data directly from record for job #%g', job.id);
if (updateJobFromRecord(job)) return job.done(); // No need to run tests; skip to complete routine
if (await updateJobFromRecord(job)) return job.done(); // No need to run tests; skip to complete routine
}

// Go ahead and prepare to run tests
Expand Down Expand Up @@ -531,7 +531,7 @@ async function buildRoutine(job) {
async function updateJob(proc) {
debug('Job routine complete');
// Attempt to update the job data from the JSON records, throw error if this fails
if (!updateJobFromRecord(job)) {
if (!await updateJobFromRecord(job)) {
job.done(new Error('Failed to return test result'));
} else {
job.done(); // All good
Expand Down

0 comments on commit 2f163d6

Please sign in to comment.