"""Runs the Treadmill container cleanup job.""" import glob import logging import os import subprocess import click from treadmill import appenv from treadmill import dirwatch from treadmill import logcontext as lc import treadmill _LOGGER = lc.ContainerAdapter(logging.getLogger(__name__)) # FIXME(boysson): This extremely high timeout value comes from the fact that we # have a very high watchdog value in runtime. _WATCHDOG_HEARTBEAT_SEC = 5 * 60 # Maximum number of cleanup request to process per cycle. Be careful of # watchdog timeouts when increasing this value. _MAX_REQUEST_PER_CYCLE = 1 _SERVICE_NAME = 'Cleanup' def init(): """Top level command handler.""" @click.command()
def setUp(self): self.ca = lc.ContainerAdapter(logging.getLogger(__name__))