Skip to content

Commit

Permalink
get images clean interval parameter from instance
Browse files Browse the repository at this point in the history
  • Loading branch information
NikolaiPetukhov committed Dec 11, 2024
1 parent 7c34871 commit 5bccbc2
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions agent/worker/agent_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ class AgentOptionsJsonFields:
DOCKER_IMAGE = "dockerImage"
FORCE_CPU_ONLY = "forceCPUOnly"
LOG_LEVEL = "logLevel"
IMAGES_CLEAN_INTERVAL = "imagesCleanInterval"


def create_img_meta_str(img_size_bytes, width, height):
Expand Down Expand Up @@ -784,6 +785,12 @@ def update_env_param(name, value, default=None):

update_env_param(constants._AGENT_HOST_DIR, agent_host_dir)

update_env_param(
constants._REMOVE_IDLE_DOCKER_IMAGE_AFTER_X_DAYS,
options.get(AgentOptionsJsonFields.IMAGES_CLEAN_INTERVAL, None),
optional_defaults[constants._REMOVE_IDLE_DOCKER_IMAGE_AFTER_X_DAYS],
)

volumes = {}

def add_volume(src: str, dst: str) -> dict:
Expand Down

0 comments on commit 5bccbc2

Please sign in to comment.