Skip to content

Commit

Permalink
cron: Add start of an active hub server
Browse files Browse the repository at this point in the history
It happened that the TCP/IP socket of the server got stuck, so
lets restart the process at each cron job.
  • Loading branch information
mkasenberg committed Jul 29, 2024
1 parent 6b2c4ce commit c8902ea
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tools/cron/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -529,10 +529,21 @@ def terminate_processes(config):
if 'vm' in config['cron']:
close_vm(config)

if 'active_hub_server_start_cmd' in config['cron']:
terminate_process(cmdline='active_hub_server.py')


def _start_processes(config, checkout_repos):
srv_process = None

if 'active_hub_server_start_cmd' in config['cron']:
log(f"Running: {config['cron']['active_hub_server_start_cmd']}")
subprocess.Popen(config['cron']['active_hub_server_start_cmd'],
shell=True,
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT,
cwd=config['cron']['autopts_repo'])

if 'vm' in config['cron']:
try:
start_vm(config, checkout_repos=checkout_repos)
Expand Down

0 comments on commit c8902ea

Please sign in to comment.