[ Avaa Bypassed ]




Upload:

Command:

www-data@3.139.85.192: ~ $
"""
Functions to be used when running metering jobs
"""

from uaclient import config
from uaclient.cli import assert_lock_file
from uaclient.contract import UAContractClient


@assert_lock_file("timer metering job")
def metering_enabled_resources(cfg: config.UAConfig) -> bool:
    # We only run this job if there is no other job running.
    # The reason for that is to avoid potential conflicts with
    # auto-attach, attach and enable operations.

    if not cfg.is_attached:
        return False

    contract = UAContractClient(cfg)
    contract.report_machine_activity()

    return True

Filemanager

Name Type Size Permission Actions
__pycache__ Folder 0755
__init__.py File 0 B 0644
metering.py File 595 B 0644
update_contract_info.py File 852 B 0644
update_messaging.py File 6.38 KB 0644