fix: remove get_config from pre_startup

This commit is contained in:
gac-x12sa
2025-07-22 12:14:39 +02:00
committed by appel_c
parent 3db74d9877
commit b6af93806a
3 changed files with 19 additions and 10 deletions

View File

@@ -20,13 +20,13 @@ def extend_command_line_args(parser):
return parser return parser
def get_config() -> ServiceConfig: # def get_config() -> ServiceConfig:
""" # """
Create and return the ServiceConfig for the plugin repository # Create and return the ServiceConfig for the plugin repository
""" # """
deployment_path = os.path.dirname(os.path.dirname(os.path.dirname(csaxs_bec.__file__))) # deployment_path = os.path.dirname(os.path.dirname(os.path.dirname(csaxs_bec.__file__)))
files = os.listdir(deployment_path) # files = os.listdir(deployment_path)
if "bec_config.yaml" in files: # if "bec_config.yaml" in files:
return ServiceConfig(config_path=os.path.join(deployment_path, "bec_config.yaml")) # return ServiceConfig(config_path=os.path.join(deployment_path, "bec_config.yaml"))
else: # else:
return ServiceConfig(redis={"host": "localhost", "port": 6379}) # return ServiceConfig(redis={"host": "localhost", "port": 6379})

View File

@@ -79,6 +79,8 @@ xbpm2x:
- 200 - 200
port: 5000 port: 5000
sign: 1 sign: 1
# precision: 3
# tolerance: 0.005
enabled: true enabled: true
onFailure: buffer onFailure: buffer
readOnly: false readOnly: false
@@ -95,6 +97,8 @@ xbpm2y:
- 200 - 200
port: 5000 port: 5000
sign: 1 sign: 1
# precision: 3
# tolerance: 0.005
enabled: true enabled: true
onFailure: buffer onFailure: buffer
readOnly: false readOnly: false
@@ -111,6 +115,8 @@ cu_foilx:
- 200 - 200
port: 5000 port: 5000
sign: 1 sign: 1
# precision: 3
# tolerance: 0.005
enabled: true enabled: true
onFailure: buffer onFailure: buffer
readOnly: false readOnly: false
@@ -127,6 +133,8 @@ scinx:
- 200 - 200
port: 5000 port: 5000
sign: 1 sign: 1
# precision: 3
# tolerance: 0.005
enabled: true enabled: true
onFailure: buffer onFailure: buffer
readOnly: false readOnly: false

1
test.txt Normal file
View File

@@ -0,0 +1 @@
jjakjda