kraken: add crash-handling around `Pair()` init
Since it can otherwise be difficult to debug due to nursery cancellation (we need that taskman yo!).port_to_latest_tractor
							parent
							
								
									b01edcf65a
								
							
						
					
					
						commit
						baff466ee0
					
				|  | @ -34,6 +34,7 @@ import urllib.parse | |||
| import hashlib | ||||
| import hmac | ||||
| import base64 | ||||
| import tractor | ||||
| import trio | ||||
| 
 | ||||
| from piker import config | ||||
|  | @ -372,8 +373,7 @@ class Client: | |||
|         #     1658347714, 'status': 'Success'}]} | ||||
| 
 | ||||
|         if xfers: | ||||
|             import tractor | ||||
|             await tractor.pp() | ||||
|             await tractor.pause() | ||||
| 
 | ||||
|         trans: dict[str, Transaction] = {} | ||||
|         for entry in xfers: | ||||
|  | @ -501,7 +501,8 @@ class Client: | |||
|             for xkey, data in resp['result'].items(): | ||||
| 
 | ||||
|                 # NOTE: always cache in pairs tables for faster lookup | ||||
|                 pair = Pair(xname=xkey, **data) | ||||
|                 with tractor.devx.maybe_open_crash_handler(): # as bxerr: | ||||
|                     pair = Pair(xname=xkey, **data) | ||||
| 
 | ||||
|                 # register the above `Pair` structs for all | ||||
|                 # key-sets/monikers: a set of 4 (frickin) tables | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue