(config)
| 398 | } |
| 399 | |
| 400 | function 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 |
no test coverage detected