Skip to content
Snippets Groups Projects
Commit 0d0839fe authored by MoSelim's avatar MoSelim
Browse files

Merge branch 'shared-data-model' of...

Merge branch 'shared-data-model' of https://gitlab.coko.foundation/xpub/xpub-epmc.git into shared-data-model
parents 5f716a41 7a606370
No related branches found
No related tags found
2 merge requests!110Dev,!109Shared data model
......@@ -39,13 +39,17 @@ const watcher = chokidar.watch(`${rootPath}**/*.tar.gz`, {
},
})
process.on('uncaughtException', err => {
if (err.submitter) {
bulkUploaderEmail(err.submitter.email, err.message)
}
errorDevEmail(err)
logger.error('whoops! there was an error', err.stack)
})
process
.on('uncaughtException', err => {
if (err.submitter) {
bulkUploaderEmail(err.submitter.email, err.message)
}
errorDevEmail(err)
logger.error('whoops! there was an error', err.stack)
})
.on('unhandledRejection', reason => {
logger.error(`Unhandled Rejection at: ${reason.stack || reason}`)
})
watcher
.on('add', path => logger.debug(`File ${path} has been added.`))
......
......@@ -298,11 +298,15 @@ function compress(tmpPath, manuscript, datedFolder) {
})
}
process.on('uncaughtException', err => {
errorDevEmail(err)
logger.error('whoops! there was an error', err.stack)
// tidyUp()
})
process
.on('uncaughtException', err => {
errorDevEmail(err)
logger.error('whoops! there was an error', err.stack)
// tidyUp()
})
.on('unhandledRejection', reason => {
logger.error(`Unhandled Rejection at: ${reason.stack || reason}`)
})
function tidyUp(tmpPath) {
try {
......
......@@ -131,7 +131,6 @@ module.exports.moveErroneousFile = function moveErroneousFile(
) {
return new Promise((resolve, reject) => {
const filename = path.basename(filepath)
const oldPath = filepath
const newPath = `${errorFolder}/${filename}_${Date.now()}`
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment