mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-29 13:04:24 -05:00
lib/models/revision.js: make independent of exec-path
Previously calling `app.js` from another directory than the base directory of CodiMD would result in an error being thrown because `lib/workers/dmpWorker.js` could not be found. This change makes the function call independent of the path CodiMD is started from. Signed-off-by: WilliButz <wbutz@cyberfnord.de>
This commit is contained in:
parent
eb885af995
commit
bd2f7cef49
1 changed files with 2 additions and 1 deletions
|
@ -5,6 +5,7 @@ var async = require('async')
|
||||||
var moment = require('moment')
|
var moment = require('moment')
|
||||||
var childProcess = require('child_process')
|
var childProcess = require('child_process')
|
||||||
var shortId = require('shortid')
|
var shortId = require('shortid')
|
||||||
|
var path = require('path')
|
||||||
|
|
||||||
// core
|
// core
|
||||||
var config = require('../config')
|
var config = require('../config')
|
||||||
|
@ -14,7 +15,7 @@ var dmpWorker = createDmpWorker()
|
||||||
var dmpCallbackCache = {}
|
var dmpCallbackCache = {}
|
||||||
|
|
||||||
function createDmpWorker () {
|
function createDmpWorker () {
|
||||||
var worker = childProcess.fork('./lib/workers/dmpWorker.js', {
|
var worker = childProcess.fork(path.resolve(__dirname, '../workers/dmpWorker.js'), {
|
||||||
stdio: 'ignore'
|
stdio: 'ignore'
|
||||||
})
|
})
|
||||||
if (config.debug) logger.info('dmp worker process started')
|
if (config.debug) logger.info('dmp worker process started')
|
||||||
|
|
Loading…
Reference in a new issue