def _wharf_init(): version = require("webdriver-wharf")[0].version logger.info('version %s', version) # Before doing anything else, grab the image or explode logger.info('Pulling image %s -- this could take a while', image_name) interactions.pull(image_name) scheduler.start() balance_containers.trigger() # Give the scheduler and executor a nice cool glass of STFU # This supresses informational messages about the task be fired by the scheduler, # as well as warnings from the executor that the task is already running. # For our purposes, neither is notable. logging.getLogger('apscheduler.scheduler').setLevel(logging.ERROR) logging.getLogger('apscheduler.executors.default').setLevel(logging.ERROR) logger.info('Initializing pool, ready for checkout')
def pull_latest_image(): # Try to pull a new image if interactions.pull(image_name): # If we got a new image, trigger a rebalance balance_containers.trigger()