Commit da5a6eabf88ad8d89125c9c5a80672c87d85511b
1 parent
aa26f84e6c
Exists in
master
isMongoReady
Showing 1 changed file with 8 additions and 0 deletions Side-by-side Diff
partner-irs.js
... | ... | @@ -197,6 +197,14 @@ function initMongoClient() { |
197 | 197 | } |
198 | 198 | } |
199 | 199 | |
200 | +function isMongoReady() { | |
201 | + if (!config.mongodb) { return; } | |
202 | + if (!config.mongodb.collection) { return; } | |
203 | + if (!mongodb) { return; } | |
204 | + | |
205 | + return true; | |
206 | +} | |
207 | + | |
200 | 208 | function insertTaskToMongoDb(task) { |
201 | 209 | if (!isMongoReady()) { return; } |
202 | 210 |