Skip to content

Commit

Permalink
Merge branch 'main' into support/3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
dsuch committed Nov 8, 2024
2 parents bf65062 + cac2e4f commit 67d5b4c
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
16 changes: 14 additions & 2 deletions code/zato-common/src/zato/common/aux_server/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def get_odb(config:'AuxServerConfig') -> 'ODBManager':

odb.pool = sql_pool_store[ZATO_ODB_POOL_NAME].pool
odb.init_session(ZATO_ODB_POOL_NAME, config.main.odb, odb.pool, False)
odb.pool.ping(odb.fs_sql_config)
_ = odb.pool.ping(odb.fs_sql_config)

return odb

Expand Down Expand Up @@ -314,7 +314,7 @@ def after_config_hook(
# ################################################################################################################################

@classmethod
def start(
def start_from_repo_location(
class_, # type: type_[AuxServer]
*,
base_dir=None, # type: strnone
Expand Down Expand Up @@ -373,6 +373,18 @@ def start(
class_.after_config_hook(config, repo_location)

# Run the server now
class_._start(config)

# ################################################################################################################################

@classmethod
def start_from_config(class_:'type_[AuxServer]', config:'AuxServerConfig') -> 'None':
class_._start(config)

# ################################################################################################################################

@classmethod
def _start(class_:'type_[AuxServer]', config:'AuxServerConfig') -> 'None':
try:
class_(config).serve_forever()
except Exception:
Expand Down
2 changes: 1 addition & 1 deletion code/zato-common/src/zato/common/ipc/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def my_callback(msg:'Bunch') -> 'str':
password = 'test.password'
server_type_suffix = ':test'

IPCServer.start(
IPCServer.start_from_repo_location(
base_dir=base_dir,
bind_host=bind_host,
bind_port=bind_port,
Expand Down
2 changes: 1 addition & 1 deletion code/zato-scheduler/src/zato/scheduler/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
# ################################################################################################################################

def main():
SchedulerServer.start()
SchedulerServer.start_from_repo_location()

# ################################################################################################################################
# ################################################################################################################################
Expand Down

0 comments on commit 67d5b4c

Please sign in to comment.