MCPcopy Create free account
hub / github.com/RocketMap/RocketMap / stagger_thread

Function stagger_thread

pogom/search.py:670–675  ·  view source on GitHub ↗
(args, account)

Source from the content-addressed store, hash-verified

668
669# Delay each thread start time so that logins only occur ~1s
670def stagger_thread(args, account):
671 if args.accounts.index(account) == 0:
672 return # No need to delay the first one
673 delay = args.accounts.index(account) + ((random.random() - .5) / 2)
674 log.debug('Delaying thread startup for %.2f seconds', delay)
675 time.sleep(delay)
676
677
678class TooManyLoginAttempts(Exception):

Callers 1

search_worker_threadFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected