#NEWLINE# def get_service_job_task_port_addition_result( args , cluster , jobs , parsing_service , current_job , host_id , instance_id , val ) : #NEWLINE# #INDENT# reg_expr = SERVICE_JOB_TASK_PORT_EXPR_REGEX . match ( val ) #NEWLINE# service = reg_expr . group ( 'service' ) #NEWLINE# job_name = reg_expr . group ( 'job' ) #NEWLINE# task_id = reg_expr . group ( 'task' ) #NEWLINE# add_num = int ( reg_expr . group ( 'num' ) ) #NEWLINE# service_config = get_service_config ( args , service , cluster ) #NEWLINE# ( host_id , instance_id ) = parse_task_number ( task_id , service_config . jobs [ job_name ] . hosts ) #NEWLINE# return ( get_base_port ( service_config . jobs [ job_name ] . base_port , instance_id ) + add_num )