Skip to content
Snippets Groups Projects
Commit 5c204b90 authored by Hamer Iboshi's avatar Hamer Iboshi
Browse files

Merge branch 'development' into route_rate_school

parents 3c319d5e 3c67704e
No related branches found
No related tags found
1 merge request!116Release v1.0.0
Pipeline #
......@@ -48,9 +48,11 @@ module.exports = function download(table, mappingTable) {
let dl = new Download({
userId: req.user._id,
table,
name: req.query.name,
mappingTable,
query: req.sql.toString()
});
console.log(dl);
dl.save((err) => {
if(err) log.error(err);
});
......@@ -59,9 +61,11 @@ module.exports = function download(table, mappingTable) {
download = new Download({
userId: req.user._id,
table,
name: req.query.name,
mappingTable,
query: req.sql.toString()
});
console.log(download);
}
download.save((err) => {
......
......@@ -14,6 +14,10 @@ let Download = new Schema({
type: String,
required: true
},
name: {
type: String,
required: true
},
mappingTable: {
type: String,
required: true
......
......@@ -58,7 +58,7 @@ simulationApp.put('/pqr', passport.authenticate('bearer', { session: false }), (
res.statusCode = 401;
return next({err: { msg: 'Unauthorized'}});
}
pqr.content = req.body.content | pqr.content;
pqr.content = req.body.content || pqr.content;
pqr.save((err) => {
if(err) {
log.error(err);
......
......@@ -14,7 +14,7 @@ if (!compatVersion()) {
if(cluster.isMaster) {
log.info(`Master ${process.pid} is running`);
const numCPUs = require('os').cpus().length;
const numCPUs = (process.env.NODE_ENV != 'development') ? require('os').cpus().length : 1;
log.info(`Master will create ${numCPUs} workers`);
for(let i=0; i < numCPUs; ++i) {
cluster.fork();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment