From 93e47015641e7e9c082ce01c1f9073fe48427b59 Mon Sep 17 00:00:00 2001 From: aschroed Date: Mon, 18 Dec 2023 12:39:12 -0500 Subject: [PATCH 1/2] add new kwarg to md5_status to limit number of files --- CHANGELOG.rst | 5 +++++ chalicelib_fourfront/checks/wfr_checks.py | 4 +++- pyproject.toml | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index d4108a77..13e5a857 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -7,6 +7,11 @@ foursight Change Log ---------- +4.1.3 +===== + +* additional improvement to md5status check to add option to limit number of files checked + 4.1.1 ===== diff --git a/chalicelib_fourfront/checks/wfr_checks.py b/chalicelib_fourfront/checks/wfr_checks.py index 900b6d7d..4642c344 100644 --- a/chalicelib_fourfront/checks/wfr_checks.py +++ b/chalicelib_fourfront/checks/wfr_checks.py @@ -88,7 +88,7 @@ def md5run_extra_file_start(connection, **kwargs): return action -@check_function(file_type='File', lab_title=None, start_date=None, action="md5run_start") +@check_function(file_type='File', lab_title=None, start_date=None, file_limit='all', action="md5run_start") def md5run_status(connection, **kwargs): """Searches for files that are uploaded to s3, but not went though md5 run. This check makes certain assumptions @@ -131,6 +131,8 @@ def md5run_status(connection, **kwargs): lab = kwargs.get('lab_title') if lab: query += '&lab.display_title=' + lab + limit = kwargs.get('file_limit') + query += '&limit=' + limit # The search res = ff_utils.search_metadata(query, key=my_auth, is_generator=True) if not any(res): diff --git a/pyproject.toml b/pyproject.toml index fb852efe..049cad0f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "foursight" -version = "4.1.1" +version = "4.1.3" description = "Serverless Chalice Application for Monitoring" authors = ["4DN-DCIC Team "] license = "MIT" From d8c7b76a17d756a3b9e74fe28020a8b92d27d8ce Mon Sep 17 00:00:00 2001 From: aschroed Date: Mon, 18 Dec 2023 12:44:52 -0500 Subject: [PATCH 2/2] update change log --- CHANGELOG.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 93fbc92e..d93e90c4 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -12,6 +12,8 @@ Change Log * additional improvement to md5status check to add option to limit number of files checked +`PR 555: add file limit option for md5_status `_ + 4.1.2 =====