MCPcopy Create free account
hub / github.com/OpenHands/OpenHands / startAutomationBackend

Function startAutomationBackend

scripts/dev-static.mjs:400–430  ·  view source on GitHub ↗
(config)

Source from the content-addressed store, hash-verified

398}
399
400function startAutomationBackend(config) {
401 logService(
402 "automation",
403 `Starting on port ${config.autoBackendPort}...`,
404 c.green,
405 );
406
407 const automationCmd = buildAutomationCommand(process.env);
408 logService("automation", `Using ${automationCmd.source}`, c.dim);
409
410 spawnService(
411 "automation",
412 automationCmd.command,
413 [
414 ...automationCmd.args,
415 "--host",
416 "0.0.0.0",
417 "--port",
418 config.autoBackendPort.toString(),
419 // Uvicorn's own level; see uvicornLogLevel. Uvicorn rejects the Python
420 // aliases and numeric levels the app itself accepts, so narrow it.
421 "--log-level",
422 uvicornLogLevel(backendLogLevel({ verbose: config.verbose })),
423 ],
424 {
425 cwd: config.stateDir,
426 env: buildAutomationBackendEnv(config),
427 color: c.green,
428 },
429 );
430}
431
432/**
433 * One MARS web bridge per stack, on the server the browser reaches: the

Callers 1

mainFunction · 0.70

Calls 6

buildAutomationCommandFunction · 0.90
uvicornLogLevelFunction · 0.90
backendLogLevelFunction · 0.90
logServiceFunction · 0.70
spawnServiceFunction · 0.70

Tested by

no test coverage detected