Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Commit

Permalink
Add new LEDGER_NO_DELAY flag to help make QA easier
Browse files Browse the repository at this point in the history
Fixes #12249

Auditors: @srirambv, @mrose17
  • Loading branch information
bsclifton committed Dec 11, 2017
1 parent 9f807e6 commit e914495
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion app/browser/api/ledger.js
Original file line number Diff line number Diff line change
Expand Up @@ -1908,8 +1908,13 @@ const init = (state) => {
}

const run = (state, delayTime) => {
let noDelay = false
if (process.env.LEDGER_NO_DELAY) {
noDelay = ledgerClient.prototype.boolion(process.env.LEDGER_NO_DELAY)
}

if (clientOptions.verboseP) {
console.log('\nledger client run: clientP=' + (!!client) + ' delayTime=' + delayTime)
console.log('\nledger client run: clientP=' + (!!client) + ' delayTime=' + delayTime + (noDelay ? ' LEDGER_NO_DELAY=true' : ''))

const line = (fields) => {
let result = ''
Expand Down Expand Up @@ -1993,6 +1998,8 @@ const run = (state, delayTime) => {

if (delayTime > 0) {
if (runTimeoutId) return
// useful for QA - #12249
if (noDelay) delayTime = 5000

const active = client
if (delayTime > (1 * ledgerUtil.milliseconds.hour)) {
Expand Down

0 comments on commit e914495

Please sign in to comment.