Move base64 conversions off of the main thread
This commit is contained in:
@@ -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
|
||||
);
|
||||
});
|
||||
|
Reference in New Issue
Block a user