Skip to content
Snippets Groups Projects
Commit a4c94580 authored by Manon Blanco's avatar Manon Blanco
Browse files

Display logs after the API call

parent c3f2ceff
No related branches found
No related tags found
1 merge request!490Explicitely log a warning when the helper doesn't support cache
Pipeline #156533 passed
......@@ -378,11 +378,13 @@ def merge_parents_cache(paths: list, current_database: Path):
def unsupported_cache(func):
def wrapper(self, *args, **kwargs):
results = func(self, *args, **kwargs)
if not self.is_read_only and not self.use_cache:
logger.warning(
f"This API helper `{func.__name__}` did not update the cache database"
)
return func(self, *args, **kwargs)
return results
return wrapper
......@@ -525,10 +525,6 @@ def test_run_update_dataset_state_api_error(
(logging.INFO, "Loaded Worker Fake worker @ 123412 from API"),
(logging.INFO, "Processing Dataset (dataset_id) (1/1)"),
(logging.INFO, "Building Dataset (dataset_id) (1/1)"),
(
logging.WARNING,
"This API helper `update_dataset_state` did not update the cache database",
),
*[
(
logging.INFO,
......@@ -540,10 +536,6 @@ def test_run_update_dataset_state_api_error(
logging.WARNING,
"An API error occurred while processing dataset dataset_id: 500 Internal Server Error - None",
),
(
logging.WARNING,
"This API helper `update_dataset_state` did not update the cache database",
),
*[
(
logging.INFO,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment