Handle occasional incompatible phone number
This commit is contained in:
parent
84a20a6743
commit
69a13235ba
@ -191,9 +191,16 @@ if __name__ == '__main__':
|
||||
|
||||
fa = open(os.path.join(user_dir, 'balances.csv'), 'w')
|
||||
|
||||
for i in range(user_count):
|
||||
|
||||
(eth, phone, o) = gen()
|
||||
i = 0
|
||||
while i < user_count:
|
||||
eth = None
|
||||
phone = None
|
||||
o = None
|
||||
try:
|
||||
(eth, phone, o) = gen()
|
||||
except Exception as e:
|
||||
logg.warning('generate failed, trying anew: {}'.format(e))
|
||||
continue
|
||||
uid = eth[2:].upper()
|
||||
|
||||
print(o)
|
||||
@ -212,5 +219,7 @@ if __name__ == '__main__':
|
||||
amount = genAmount()
|
||||
fa.write('{},{}\n'.format(eth,amount))
|
||||
logg.debug('pidx {}, uid {}, eth {}, amount {}'.format(pidx, uid, eth, amount))
|
||||
|
||||
i += 1
|
||||
|
||||
fa.close()
|
||||
|
@ -38,7 +38,7 @@ argparser.add_argument('--redis-host-callback', dest='redis_host_callback', defa
|
||||
argparser.add_argument('--redis-port-callback', dest='redis_port_callback', default=6379, type=int, help='redis port to use for callback')
|
||||
argparser.add_argument('--batch-size', dest='batch_size', default=50, type=int, help='burst size of sending transactions to node')
|
||||
argparser.add_argument('--batch-delay', dest='batch_delay', default=2, type=int, help='seconds delay between batches')
|
||||
argparser.add_argument('--timeout', default=20.0, type=float, help='Callback timeout')
|
||||
argparser.add_argument('--timeout', default=60.0, type=float, help='Callback timeout')
|
||||
argparser.add_argument('-q', type=str, default='cic-eth', help='Task queue')
|
||||
argparser.add_argument('-v', action='store_true', help='Be verbose')
|
||||
argparser.add_argument('-vv', action='store_true', help='Be more verbose')
|
||||
|
Loading…
Reference in New Issue
Block a user