fix: await page render to finish before resolving

This commit is contained in:
Nick 2019-02-02 16:59:00 -05:00
parent e3943439e5
commit 830ddd9d2c
6 changed files with 10 additions and 3 deletions

2
.gitignore vendored
View File

@ -17,6 +17,8 @@ npm-debug.log*
# Generated assets # Generated assets
/assets /assets
server/views/master.pug
server/views/setup.pug
# Webpack # Webpack
.webpack-cache .webpack-cache

View File

@ -13,6 +13,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
- Fixed root admin refresh token fail - Fixed root admin refresh token fail
- Fixed error page metadata title warning - Fixed error page metadata title warning
- Fixed telemetry - Fixed telemetry
- Await page render job to complete before resolving
### Changed ### Changed
- Moved Insert Media button in Markdown editor - Moved Insert Media button in Markdown editor

View File

@ -65,7 +65,7 @@ Wiki.js can run on virtually all platforms where Node.js can (Windows, Mac, Linu
- MariaDB **10.2.7** or later - MariaDB **10.2.7** or later
- Microsoft SQL Server **2012** or later - Microsoft SQL Server **2012** or later
- SQLite **3.9** or later - SQLite **3.9** or later
- Redis **3.2** or later - Redis **3.0** or later
> Read the full [prerequisites](https://docs-beta.requarks.io/install/requirements) article for full details. > Read the full [prerequisites](https://docs-beta.requarks.io/install/requirements) article for full details.

View File

@ -197,13 +197,14 @@ module.exports = class Page extends Model {
static async renderPage(page) { static async renderPage(page) {
const pipeline = await WIKI.models.renderers.getRenderingPipeline(page.contentType) const pipeline = await WIKI.models.renderers.getRenderingPipeline(page.contentType)
WIKI.queue.job.renderPage.add({ const renderJob = await WIKI.queue.job.renderPage.add({
page, page,
pipeline pipeline
}, { }, {
removeOnComplete: true, removeOnComplete: true,
removeOnFail: true removeOnFail: true
}) })
return renderJob.finished()
} }
static async getPage(opts) { static async getPage(opts) {

View File

@ -5,7 +5,6 @@ author: requarks.io
logo: https://static.requarks.io/logo/local-fs.svg logo: https://static.requarks.io/logo/local-fs.svg
website: https://wiki.js.org website: https://wiki.js.org
supportedModes: supportedModes:
- sync
- push - push
props: props:
path: path:

View File

@ -4,6 +4,10 @@ description: Git is a version control system for tracking changes in computer fi
author: requarks.io author: requarks.io
logo: https://static.requarks.io/logo/git-alt.svg logo: https://static.requarks.io/logo/git-alt.svg
website: https://git-scm.com/ website: https://git-scm.com/
supportedModes:
- sync
- push
- pull
props: props:
authType: authType:
type: String type: String