Thomas Nilefalk
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
1 additions and
1 deletions
-
server/jobs/rebuild-tree.js
|
|
@ -57,7 +57,7 @@ module.exports = async (pageId) => { |
|
|
|
await WIKI.models.knex.table('pageTree').truncate() |
|
|
|
if (tree.length > 0) { |
|
|
|
// -> Save in chunks, because of per query max parameters (35k Postgres, 2k MSSQL, 1k for SQLite)
|
|
|
|
if ((WIKI.config.db.type !== 'sqlite')) |
|
|
|
if ((WIKI.config.db.type !== 'sqlite')) { |
|
|
|
for (const chunk of _.chunk(tree, 100)) { |
|
|
|
await WIKI.models.knex.table('pageTree').insert(chunk) |
|
|
|
} |
|
|
|