Add missing awaits in SQL logging

This commit is contained in:
Fedor Indutny 2021-04-14 08:50:45 -07:00 committed by GitHub
parent 25458be515
commit cb75e8b5f7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1729,7 +1729,7 @@ async function initialize({
globalInstance = db; globalInstance = db;
// test database // test database
getMessageCount(); await getMessageCount();
} catch (error) { } catch (error) {
console.log('Database startup error:', error.stack); console.log('Database startup error:', error.stack);
if (db) { if (db) {
@ -1778,7 +1778,7 @@ async function initializeRenderer({
globalInstanceRenderer = promisified; globalInstanceRenderer = promisified;
// test database // test database
getMessageCount(); await getMessageCount();
} catch (error) { } catch (error) {
window.log.error('Database startup error:', error.stack); window.log.error('Database startup error:', error.stack);
throw error; throw error;
@ -4300,7 +4300,7 @@ async function removeKnownAttachments(
); );
const chunkSize = 50; const chunkSize = 50;
const total = getMessageCount(); const total = await getMessageCount();
console.log( console.log(
`removeKnownAttachments: About to iterate through ${total} messages` `removeKnownAttachments: About to iterate through ${total} messages`
); );
@ -4350,7 +4350,7 @@ async function removeKnownAttachments(
// value is still a string but it's smaller than every other string. // value is still a string but it's smaller than every other string.
id = 0; id = 0;
const conversationTotal = getConversationCount(); const conversationTotal = await getConversationCount();
console.log( console.log(
`removeKnownAttachments: About to iterate through ${conversationTotal} conversations` `removeKnownAttachments: About to iterate through ${conversationTotal} conversations`
); );
@ -4453,7 +4453,7 @@ async function removeKnownDraftAttachments(
); );
const chunkSize = 50; const chunkSize = 50;
const total = getConversationCount(); const total = await getConversationCount();
console.log( console.log(
`removeKnownDraftAttachments: About to iterate through ${total} conversations` `removeKnownDraftAttachments: About to iterate through ${total} conversations`
); );