Compare View
Commits (2)
Changes
Showing 2 changed files Side-by-side Diff
gateway/resend-delay.js
... | ... | @@ -11,6 +11,10 @@ const resendHandlers = LRU({ |
11 | 11 | maxAge: 1000 * 3600 * 24 |
12 | 12 | }); |
13 | 13 | |
14 | +function isEnabled() { | |
15 | + return config && config.auto_resend && Number(config.auto_resend.delay_ms) && Number(config.auto_resend.max_retry); | |
16 | +} | |
17 | + | |
14 | 18 | function _resend(task, request) { |
15 | 19 | const trx_date = moment(task.created).format('YYYYMMDD'); |
16 | 20 | if (trx_date !== moment().format('YYYYMMDD')) { |
... | ... | @@ -82,3 +86,4 @@ setInterval( |
82 | 86 | |
83 | 87 | exports.cancel = cancel; |
84 | 88 | exports.register = register; |
89 | +exports.isEnabled = isEnabled; |