mirror of
https://github.com/goharbor/harbor.git
synced 2025-02-01 12:31:23 +01:00
Update prepare to avoid error when max_job_duration_hours not configured (#21395)
Signed-off-by: stonezdj <stone.zhang@broadcom.com>
This commit is contained in:
parent
8ca455eb76
commit
12382fa8ae
@ -222,7 +222,7 @@ def parse_yaml_config(config_file_path, with_trivy):
|
||||
# jobservice config
|
||||
js_config = configs.get('jobservice') or {}
|
||||
config_dict['max_job_workers'] = js_config["max_job_workers"]
|
||||
config_dict['max_job_duration_hours'] = js_config["max_job_duration_hours"] or 24
|
||||
config_dict['max_job_duration_hours'] = js_config.get("max_job_duration_hours") or 24
|
||||
value = config_dict["max_job_duration_hours"]
|
||||
if not isinstance(value, int) or value < 24:
|
||||
config_dict["max_job_duration_hours"] = 24
|
||||
|
Loading…
Reference in New Issue
Block a user