MCPcopy
hub / github.com/kyegomez/swarms / start

Method start

api/advanced_api.py:1068–1084  ·  view source on GitHub ↗

Start all API processes.

(self)

Source from the content-addressed store, hash-verified

1066 time.sleep(5)
1067
1068 def start(self):
1069 """Start all API processes."""
1070 logger.info(f"Starting {self.num_processes} API processes...")
1071
1072 # Start worker processes
1073 for i in range(self.num_processes):
1074 port = self.base_port + i + 1
1075 self.start_process(port)
1076
1077 # Start monitoring thread
1078 monitor_thread = threading.Thread(
1079 target=self.monitor_processes
1080 )
1081 monitor_thread.daemon = True
1082 monitor_thread.start()
1083
1084 logger.info("All processes started successfully")
1085
1086 def shutdown(self):
1087 """Shutdown all processes."""

Callers 15

start_processMethod · 0.45
wrapperFunction · 0.45
activate_sentryFunction · 0.45
threaded_runMethod · 0.45
__init__Method · 0.45
enable_autosaveMethod · 0.45
run_task_with_timeoutMethod · 0.45
runMethod · 0.45
mainFunction · 0.45
mainFunction · 0.45
mainFunction · 0.45

Calls 1

start_processMethod · 0.95

Tested by 4

mainFunction · 0.36
mainFunction · 0.36