Skip to content

Commit

Permalink
fix: number env add parseInt
Browse files Browse the repository at this point in the history
  • Loading branch information
fengkx committed Dec 16, 2019
1 parent 69b0ca0 commit 85f292d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions config/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ module.exports = {
process.env.RSSBOT_DB_PATH ||
path.join(__dirname, '../data/database.db'),
lang: process.env.RSSBOT_LANG || 'zh-cn',
item_num: process.env.RSSBOT_ITEM_NUM || 10,
item_num: parseInt(process.env.RSSBOT_ITEM_NUM) || 10,
fetch_gap: process.env.RSSBOT_FETCH_GAP || '5m',
notify_error_count: process.env.NOTIFY_ERR_COUNT || 5,
notify_error_count: parseInt(process.env.NOTIFY_ERR_COUNT) || 5,
view_all: !!process.env.RSSBOT_VIEW_ALL || false,
UA:
process.env.RSSBOT_UA ||
`Mozilla/5.0 NodeRSSBot v${version}(https://github.com/fengkx/NodeRSSBot)`,
not_send: process.env.NOT_SEND || false, // just for debug use
concurrency: process.env.RSSBOT_CONCURRENCY || 200,
concurrency: parseInt(process.env.RSSBOT_CONCURRENCY) || 200,
delete_on_err_send: process.env.DELETE_ON_ERR_SEND || true, // block and chat not found
resp_timeout: process.env.RSSBOT_RESP_TIMEOUT || 40
resp_timeout: parseInt(process.env.RSSBOT_RESP_TIMEOUT) || 40
};

0 comments on commit 85f292d

Please sign in to comment.