Move base64 conversions off of the main thread

This commit is contained in:
Scott Nonnenberg 2018-08-16 10:45:09 -07:00
parent 911bc63c67
commit 02fbea96c0
7 changed files with 167 additions and 5 deletions

View file

@ -166,7 +166,7 @@ ipcRenderer.on(
const job = _getJob(jobId);
if (!job) {
throw new Error(
`Received job reply to job ${jobId}, but did not have it in our registry!`
`Received SQL channel reply to job ${jobId}, but did not have it in our registry!`
);
}
@ -174,7 +174,9 @@ ipcRenderer.on(
if (errorForDisplay) {
return reject(
new Error(`Error calling channel ${fnName}: ${errorForDisplay}`)
new Error(
`Error received from SQL channel job ${jobId} (${fnName}): ${errorForDisplay}`
)
);
}
@ -196,7 +198,8 @@ function makeChannel(fnName) {
});
setTimeout(
() => reject(new Error(`Request to ${fnName} timed out`)),
() =>
reject(new Error(`SQL channel job ${jobId} (${fnName}) timed out`)),
DATABASE_UPDATE_TIMEOUT
);
});