2222from pathlib import Path
2323from typing import Dict , List , Optional , Tuple , TYPE_CHECKING
2424
25- import keyring
2625from TM1py import TM1Service
2726from TM1py .Exceptions import TM1pyTimeout
2827
2928from rushti .task import Task , OptimizedTask
3029from rushti .dag import DAG
30+ from rushti .tm1_integration import resolve_tm1_params
3131from rushti .messages import (
3232 MSG_PROCESS_EXECUTE ,
3333 MSG_PROCESS_SUCCESS ,
@@ -174,11 +174,6 @@ def setup_tm1_services(
174174 # handle default values from configparser
175175 if tm1_server_name != config .default_section :
176176 try :
177- use_keyring = config .getboolean (tm1_server_name , "use_keyring" , fallback = False )
178- if use_keyring :
179- password = keyring .get_password (tm1_server_name , params .get ("user" ))
180- params ["password" ] = password
181-
182177 connection_file = config .get (tm1_server_name , "connection_file" , fallback = None )
183178
184179 # restore connection from file. In practice faster than creating a new one
@@ -199,9 +194,9 @@ def setup_tm1_services(
199194
200195 # case no connection file provided or connection file expired
201196 if tm1_server_name not in tm1_services :
202- params . pop ( "session_context" , None )
197+ resolved_params = resolve_tm1_params ( config , tm1_server_name )
203198 tm1_services [tm1_server_name ] = TM1Service (
204- ** params ,
199+ ** resolved_params ,
205200 session_context = session_context ,
206201 connection_pool_size = max_workers ,
207202 )
0 commit comments