#NEWLINE# def _migrate_got_app( self , key , value , app_id , deploy_info , move , cb ) : #NEWLINE# #INDENT# if ( not actor_name ) : #NEWLINE# #INDENT# if cb : #NEWLINE# #INDENT# cb ( status = response . CalvinResponse ( response . NOT_FOUND ) ) #NEWLINE# #UNINDENT# return #NEWLINE# #UNINDENT# app = Application ( app_id , value [ 'name' ] , value [ 'origin_node_id' ] , self . _node . am , actors = value [ 'actors_name_map' ] , deploy_info = deploy_info ) #NEWLINE# app . group_components ( ) #NEWLINE# app . _migrated_actors = { a : None for a in app . actors } #NEWLINE# for ( actor_id , actor_name ) in app . actors . iteritems ( ) : #NEWLINE# #INDENT# req = app . get_req ( actor_name ) #NEWLINE# if ( req is None ) : #NEWLINE# #INDENT# _log . analyze ( self . _node . id , '+ NO REQ' , { #NEWLINE# #INDENT# 'actor_id' : actor_id , #NEWLINE# 'actor_name' : actor_name , #NEWLINE# #UNINDENT# } ) #NEWLINE# self . _migrated_cb ( response . CalvinResponse ( True ) , app , actor_id , cb ) #NEWLINE# continue #NEWLINE# #UNINDENT# if ( actor_id in self . _node . am . actors ) : #NEWLINE# #INDENT# _log . analyze ( self . _node . id , '+ OWN ACTOR' , { #NEWLINE# #INDENT# 'actor_id' : actor_id , #NEWLINE# 'actor_name' : actor_name , #NEWLINE# #UNINDENT# } ) #NEWLINE# self . _node . am . update_requirements ( actor_id , req , False , move , callback = CalvinCB ( self . _migrated_cb , app = app , actor_id = actor_id , cb = cb ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# _log . analyze ( self . _node . id , '+ OTHER NODE' , { #NEWLINE# #INDENT# 'actor_id' : actor_id , #NEWLINE# 'actor_name' : actor_name , #NEWLINE# #UNINDENT# } ) #NEWLINE# self . storage . get_actor ( actor_id , cb = CalvinCB ( self . _migrate_from_rt , app = app , actor_id = actor_id , req = req , move = move , cb = cb ) )