#NEWLINE# def get_bundle_worker( self , uuid ) : #NEWLINE# #INDENT# '\n        Returns information about the worker that the given bundle is running\n        on. This method should be called only for bundles that are running.\n        ' #NEWLINE# with self . _engine . begin ( ) as connection : #NEWLINE# #INDENT# row = connection . execute ( cl_worker_run . select ( ) . where ( ( cl_worker_run . c . run_uuid == uuid ) ) ) . fetchone ( ) #NEWLINE# precondition ( row , 'Trying to find worker for bundle that is not running.' ) #NEWLINE# worker_row = connection . execute ( cl_worker . select ( ) . where ( and_ ( ( cl_worker . c . user_id == row . user_id ) , ( cl_worker . c . worker_id == row . worker_id ) ) ) ) . fetchone ( ) #NEWLINE# return { #NEWLINE# #INDENT# 'user_id' : worker_row . user_id , #NEWLINE# 'worker_id' : worker_row . worker_id , #NEWLINE# 'socket_id' : worker_row . socket_id , #NEWLINE# #UNINDENT# }