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

Commit

Permalink
Merge pull request #12251 from bsclifton/ledger-no-delay
Browse files Browse the repository at this point in the history
Add new LEDGER_NO_DELAY flag to help make QA easier
  • Loading branch information
bsclifton authored Dec 11, 2017
2 parents 65cb44a + e914495 commit 94a24e3
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 94a24e3

Please sign in to comment.