How to use the cobald.composite.weighted.WeightedComposite function in cobald

To help you get started, we’ve selected a few cobald examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github MatterMiners / tardis / tardis / resources / poolfactory.py View on Github external
Standardiser(
                        FactoryPool(*check_pointed_drones, factory=drone_factory),
                        minimum=cpu_cores,
                        granularity=cpu_cores,
                    ),
                    name=f"{site.name.lower()}_{machine_type.lower()}",
                )
            )
        composites.append(
            Standardiser(
                WeightedComposite(*site_composites, weight="utilisation"),
                maximum=site.quota if site.quota >= 0 else inf,
            )
        )

    return WeightedComposite(*composites, weight="utilisation")
github MatterMiners / tardis / tardis / resources / poolfactory.py View on Github external
cpu_cores = getattr(configuration, site.name).MachineMetaData[machine_type][
                "Cores"
            ]
            site_composites.append(
                Logger(
                    Standardiser(
                        FactoryPool(*check_pointed_drones, factory=drone_factory),
                        minimum=cpu_cores,
                        granularity=cpu_cores,
                    ),
                    name=f"{site.name.lower()}_{machine_type.lower()}",
                )
            )
        composites.append(
            Standardiser(
                WeightedComposite(*site_composites, weight="utilisation"),
                maximum=site.quota if site.quota >= 0 else inf,
            )
        )

    return WeightedComposite(*composites, weight="utilisation")