mirror of
https://github.com/thelounge/thelounge.git
synced 2024-06-15 20:15:11 +02:00
Change sqlite parallelize to serialize when loading messages
This commit is contained in:
parent
44de1dd03f
commit
5a0e0b6718
|
@ -159,7 +159,7 @@ class MessageStorage {
|
||||||
const limit = Helper.config.maxHistory < 0 ? 100000 : Helper.config.maxHistory;
|
const limit = Helper.config.maxHistory < 0 ? 100000 : Helper.config.maxHistory;
|
||||||
|
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
this.database.parallelize(() =>
|
this.database.serialize(() =>
|
||||||
this.database.all(
|
this.database.all(
|
||||||
"SELECT msg, type, time FROM messages WHERE network = ? AND channel = ? ORDER BY time DESC LIMIT ?",
|
"SELECT msg, type, time FROM messages WHERE network = ? AND channel = ? ORDER BY time DESC LIMIT ?",
|
||||||
[network.uuid, channel.name.toLowerCase(), limit],
|
[network.uuid, channel.name.toLowerCase(), limit],
|
||||||
|
|
Loading…
Reference in a new issue