Browse Source

数据库变量名

master
巴林闲侠 3 years ago
parent
commit
5accd55a39
  1. 1
      api/app/lib/schedule/attendance.js
  2. 6
      api/config.js

1
api/app/lib/schedule/attendance.js

@ -317,6 +317,7 @@ module.exports = function (app, opts) {
let packageSuccess = true let packageSuccess = true
// 考虑加了好多天的流程 // 考虑加了好多天的流程
let curday = begainTime_.clone() let curday = begainTime_.clone()
let packageDay = []
while (curday.isSameOrBefore(endTimeWithHrAffirm)) { while (curday.isSameOrBefore(endTimeWithHrAffirm)) {
let duration_ = 0 let duration_ = 0
if (curday.isSame(endTimeWithHrAffirm, 'day')) { if (curday.isSame(endTimeWithHrAffirm, 'day')) {

6
api/config.js

@ -33,7 +33,7 @@ args.option('clickHouseHr', 'clickHouse 人资数据库名称');
const flags = args.parse(process.argv); const flags = args.parse(process.argv);
const POMS_DB = process.env.POMS_DB || flags.pg; const HR_DB = process.env.HR_DB || flags.pg;
const LOCAL_SVR_ORIGIN = process.env.LOCAL_SVR_ORIGIN || flags.fileHost; const LOCAL_SVR_ORIGIN = process.env.LOCAL_SVR_ORIGIN || flags.fileHost;
// Redis 参数 // Redis 参数
@ -63,7 +63,7 @@ const CLICKHOUST_HR = process.env.CLICKHOUST_HR || flags.clickHouseHr
const API_TIMOR_URL = 'http://timor.tech/api/' const API_TIMOR_URL = 'http://timor.tech/api/'
if ( if (
!POMS_DB !HR_DB
|| !IOTA_REDIS_SERVER_HOST || !IOTA_REDIS_SERVER_PORT || !IOTA_REDIS_SERVER_HOST || !IOTA_REDIS_SERVER_PORT
|| !API_EMIS_URL || !API_EMIS_URL
|| !QINIU_DOMAIN_QNDMN_RESOURCE || !QINIU_BUCKET_RESOURCE || !QINIU_AK || !QINIU_SK || !QINIU_DOMAIN_QNDMN_RESOURCE || !QINIU_BUCKET_RESOURCE || !QINIU_AK || !QINIU_SK
@ -162,7 +162,7 @@ const product = {
} }
], ],
dc: { dc: {
url: POMS_DB, url: HR_DB,
opts: { opts: {
pool: { pool: {
max: 80, max: 80,

Loading…
Cancel
Save