commit c9ace7de89ed9fbad94129361cc7f0e32e8acab4 Author: juga0 juga@riseup.net Date: Tue Jan 22 18:55:34 2019 +0000
scanner: move log to function that starts measuring
since the relay might start being measured some time after apply_async is called if there're not available threads. --- sbws/core/scanner.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/sbws/core/scanner.py b/sbws/core/scanner.py index 166ce5d..2dc8277 100644 --- a/sbws/core/scanner.py +++ b/sbws/core/scanner.py @@ -202,6 +202,7 @@ def _pick_ideal_second_hop(relay, dest, rl, cont, is_exit):
def measure_relay(args, conf, destinations, cb, rl, relay): + log.debug('Measuring %s %s', relay.nickname, relay.fingerprint) s = requests_utils.make_session( cb.controller, conf.getfloat('general', 'http_timeout')) # Pick a destionation @@ -409,8 +410,6 @@ def main_loop(args, conf, controller, relay_list, circuit_builder, result_dump, if settings.end_event.is_set(): break num_relays += 1 - log.debug('Measuring %s %s', target.nickname, - target.fingerprint[0:8]) # callback and callback_err must be non-blocking callback = result_putter(result_dump) callback_err = result_putter_error(target)
tor-commits@lists.torproject.org