expressgy 1 year ago
parent 8532b02da4
commit 389c0a0d53
  1. 2
      config.js
  2. 8
      server.js

@ -2,7 +2,7 @@ const SERVER_PORT = 5000;
// 数据库名称
const DATABASELIST = ['procatch-cloud', 'procatch-config', 'procatch-flowable'];
export default {
module.export = {
SERVER_PORT,
DATABASELIST
}

@ -21,7 +21,7 @@ function server(){
app.use(koaBody({
multipart: true, // 支持文件上传
formidable: {
maxFieldsSize: 10 * 1024 * 1024, // 最大文件为2兆
maxFieldsSize: 500 * 1024 * 1024, // 最大文件为2兆
multipart: true // 是否支持 multipart-formdate 的表单
}
}));
@ -73,13 +73,17 @@ function back(){
const outTime = getT() - new Date().getTime()
DATABASELIST.forEach(i => {
})
for(let item in DATABASELIST){
const i = DATABASELIST[item];
database = i;
setTimeout(() => {
setInterval(() => {
backSQL(host, user, passwd, database)
}, 1000 * 60 * mintues)
},outTime)
})
}
}

Loading…
Cancel
Save