Skip to content

Commit

Permalink
fix: await page render to finish before resolving
Browse files Browse the repository at this point in the history
  • Loading branch information
NGPixel committed Feb 2, 2019
1 parent e394343 commit 830ddd9
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ npm-debug.log*

# Generated assets
/assets
server/views/master.pug
server/views/setup.pug

# Webpack
.webpack-cache
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
- Fixed root admin refresh token fail
- Fixed error page metadata title warning
- Fixed telemetry
- Await page render job to complete before resolving

### Changed
- Moved Insert Media button in Markdown editor
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
- Microsoft SQL Server **2012** 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.
Expand Down
3 changes: 2 additions & 1 deletion server/models/pages.js
Original file line number Diff line number Diff line change
Expand Up @@ -197,13 +197,14 @@ module.exports = class Page extends Model {

static async renderPage(page) {
const pipeline = await WIKI.models.renderers.getRenderingPipeline(page.contentType)
WIKI.queue.job.renderPage.add({
const renderJob = await WIKI.queue.job.renderPage.add({
page,
pipeline
}, {
removeOnComplete: true,
removeOnFail: true
})
return renderJob.finished()
}

static async getPage(opts) {
Expand Down
1 change: 0 additions & 1 deletion server/modules/storage/disk/definition.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ author: requarks.io
logo: https://static.requarks.io/logo/local-fs.svg
website: https://wiki.js.org
supportedModes:
- sync
- push
props:
path:
Expand Down
4 changes: 4 additions & 0 deletions server/modules/storage/git/definition.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ description: Git is a version control system for tracking changes in computer fi
author: requarks.io
logo: https://static.requarks.io/logo/git-alt.svg
website: https://git-scm.com/
supportedModes:
- sync
- push
- pull
props:
authType:
type: String
Expand Down

0 comments on commit 830ddd9

Please sign in to comment.