Skip to content

main

main() #

Launch COGIP Robot Camera.

During installation of cogip-tools, setuptools is configured to create the cogip-robotcam script using this function as entrypoint.

Source code in cogip/tools/robotcam/main.py
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
def main() -> None:
    """
    Launch COGIP Robot Camera.

    During installation of cogip-tools, `setuptools` is configured
    to create the `cogip-robotcam` script using this function as entrypoint.
    """
    settings = Settings()

    # Start Camera handler process
    p = Process(target=start_camera_handler)
    p.start()

    # Start web server
    uvicorn.run(
        "cogip.tools.robotcam.app:app",
        host="0.0.0.0",
        port=8100 + settings.id,
        workers=settings.nb_workers,
        log_level="warning",
    )

    p.terminate()