(peer, plugin, **kwargs)
| 12 | |
| 13 | @plugin.hook('peer_connected') |
| 14 | def on_connected(peer, plugin, **kwargs): |
| 15 | print(f"peer_connected_logger_a {peer['id']} {peer}") |
| 16 | if plugin.get_option("logger_a_sleep") is True: |
| 17 | # Block until file appears |
| 18 | while not os.path.exists("unsleep"): |
| 19 | time.sleep(0.25) |
| 20 | return {'result': 'continue'} |
| 21 | |
| 22 | |
| 23 | plugin.add_option("logger_a_sleep", False, 'Block until unsleep file exists', opt_type='bool') |
nothing calls this directly
no test coverage detected