(config)
return cull_service
Set Idle Culler service
Set Idle Culler service
Set Idle Culler service
def set_cull_idle_service(config):
    """
    Set Idle Culler service
    """
    cull_cmd = [sys.executable, "-m", "jupyterhub_idle_culler"]
    cull_config = config["services"]["cull"]
    print()

    cull_cmd += ["--timeout=%d" % cull_config["timeout"]]
    cull_cmd += ["--cull-every=%d" % cull_config["every"]]
    cull_cmd += ["--concurrency=%d" % cull_config["concurrency"]]
    cull_cmd += ["--max-age=%d" % cull_config["max_age"]]
    if cull_config["users"]:
        cull_cmd += ["--cull-users"]

    cull_service = {
        "name": "cull-idle",
        "admin": True,
        "command": cull_cmd,
    }

    return cull_service
def set_cull_idle_service ( config ) : cull_cmd = [ sys . executable , "-m" , "jupyterhub_idle_culler" ] cull_config = config [ "services" ] [ "cull" ] print ( ) cull_cmd += [ "--timeout=%d" % cull_config [ "timeout" ] ] cull_cmd += [ "--cull-every=%d" % cull_config [ "every" ] ] cull_cmd += [ "--concurrency=%d" % cull_config [ "concurrency" ] ] cull_cmd += [ "--max-age=%d" % cull_config [ "max_age" ] ] if cull_config [ "users" ] : cull_cmd += [ "--cull-users" ] cull_service = { "name" : "cull-idle" , "admin" : True , "command" : cull_cmd , } return cull_service