mirror of
https://github.com/alexgo-io/stacks-puppet-node.git
synced 2026-04-27 17:30:30 +08:00
make getinfo faster so we can use it more in atlas in order to tell if we're talking to a testnet or mainnet node. We'll make it so mainnet nodes and testnet nodes ignore each other.
This commit is contained in:
@@ -122,7 +122,7 @@ def db_query_execute(cur, query, values, abort=True, max_timeout=300):
|
||||
return ret
|
||||
except sqlite3.OperationalError as oe:
|
||||
if oe.message == "database is locked":
|
||||
timeout = min(max_timeout, timeout * 2 + timeout * random.random())
|
||||
timeout = min(max_timeout, timeout * 1.1 + timeout * random.random())
|
||||
log.error("Query timed out due to lock; retrying in %s: %s" % (timeout, db_format_query( query, values )))
|
||||
time.sleep(timeout)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user