How to use the cobald.decorator.logger.Logger 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
)
                for resource_attributes in check_pointed_resources
            ]

            # create drone factory for COBalD FactoryPool
            drone_factory = partial(
                create_drone,
                site_agent=site_agent,
                batch_system_agent=batch_system_agent,
                plugins=plugins.values(),
            )
            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")