#NEWLINE# @ base . post_async ( '/nodes/fixmigrating' ) #NEWLINE# def fix_node_migrating( request ) : #NEWLINE# #INDENT# n = models . node . get_by_host_port ( request . form [ 'host' ] , int ( request . form [ 'port' ] ) ) #NEWLINE# if ( ( n is None ) or ( n . assignee is None ) ) : #NEWLINE# #INDENT# raise ValueError ( 'no such node in cluster' ) #NEWLINE# #UNINDENT# task = models . task . ClusterTask ( cluster_id = n . assignee . id , task_type = models . task . TASK_TYPE_FIX_MIGRATE ) #NEWLINE# task . add_step ( 'fix_migrate' , host = n . host , port = n . port ) #NEWLINE# db . session . add ( task )