#NEWLINE# def _destroy( self , application , cb = None ) : #NEWLINE# #INDENT# _log . analyze ( self . _node . id , '+' , { #NEWLINE# #INDENT# 'actors' : application . actors , #NEWLINE# #UNINDENT# } ) #NEWLINE# application . destroy_cb = cb #NEWLINE# try : #NEWLINE# #INDENT# del application . _destroy_node_ids #NEWLINE# #UNINDENT# except : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# application . clear_node_info ( ) #NEWLINE# for actor_id in application . actors . keys ( ) [ : ] : #NEWLINE# #INDENT# if ( actor_id in self . _node . am . list_actors ( ) ) : #NEWLINE# #INDENT# _log . analyze ( self . _node . id , '+ LOCAL ACTOR' , { #NEWLINE# #INDENT# 'actor_id' : actor_id , #NEWLINE# #UNINDENT# } ) #NEWLINE# self . _node . am . destroy ( actor_id ) #NEWLINE# application . remove_actor ( actor_id ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# _log . analyze ( self . _node . id , '+ REMOTE ACTOR' , { #NEWLINE# #INDENT# 'actor_id' : actor_id , #NEWLINE# #UNINDENT# } ) #NEWLINE# self . storage . get_actor ( actor_id , CalvinCB ( func = self . _destroy_actor_cb , application = application ) ) #NEWLINE# #UNINDENT# #UNINDENT# if ( ( not application . actors ) or application . complete_node_info ( ) ) : #NEWLINE# #INDENT# _log . analyze ( self . _node . id , '+ DONE' , { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) #NEWLINE# self . _destroy_final ( application )