Skip to content
Snippets Groups Projects
Commit e0b10aa5 authored by Bjarke Madsen's avatar Bjarke Madsen
Browse files

Don't validate joblog:cached-response values

parent 557da151
No related branches found
No related tags found
1 merge request!20Don't validate joblog:cached-response values
...@@ -53,10 +53,10 @@ TASK_LOG_RESPONSE_SCHEMA = { ...@@ -53,10 +53,10 @@ TASK_LOG_RESPONSE_SCHEMA = {
"$schema": "https://json-schema.org/draft-07/schema#", "$schema": "https://json-schema.org/draft-07/schema#",
"type": "object", "type": "object",
"properties": { "properties": {
"pending": {"type": "array", "items": {"type": "string"}}, "pending": {"type": "array", "items": {"type": "string"}},
"errors": {"type": "array", "items": {"type": "string"}}, "errors": {"type": "array", "items": {"type": "string"}},
"failed": {"type": "array", "items": {"type": "string"}}, "failed": {"type": "array", "items": {"type": "string"}},
"warnings": {"type": "array", "items": {"type": "string"}}, "warnings": {"type": "array", "items": {"type": "string"}},
}, },
"required": ["pending", "errors", "failed", "warnings"], "required": ["pending", "errors", "failed", "warnings"],
"additionalProperties": False "additionalProperties": False
...@@ -198,8 +198,7 @@ def load_task_log(): ...@@ -198,8 +198,7 @@ def load_task_log():
} }
found_tasks = False found_tasks = False
for task in monitor.load_task_log( for task in monitor.load_task_log(current_app.config['INVENTORY_PROVIDER_CONFIG'], {cache_key}).values():
current_app.config['INVENTORY_PROVIDER_CONFIG']).values():
found_tasks = True found_tasks = True
......
...@@ -102,7 +102,7 @@ def run(): ...@@ -102,7 +102,7 @@ def run():
with app.connection() as connection: with app.connection() as connection:
recv = app.events.Receiver(connection, handlers={ recv = app.events.Receiver(connection, handlers={
'*': _log_event '*': _log_event
}) })
recv.capture(limit=None, timeout=None, wakeup=True) recv.capture(limit=None, timeout=None, wakeup=True)
...@@ -163,7 +163,7 @@ def _redis_client_proc(key_queue, value_queue, config_params): ...@@ -163,7 +163,7 @@ def _redis_client_proc(key_queue, value_queue, config_params):
value_queue.put(None) value_queue.put(None)
def load_task_log(config_params, ignored_keys=[]): def load_task_log(config_params, ignored_keys=None):
""" """
load the task log in a formatted dictionary: load the task log in a formatted dictionary:
keys are task uuid's keys are task uuid's
...@@ -178,6 +178,10 @@ def load_task_log(config_params, ignored_keys=[]): ...@@ -178,6 +178,10 @@ def load_task_log(config_params, ignored_keys=[]):
:param ignored_keys: list of keys to ignore if found :param ignored_keys: list of keys to ignore if found
:return: :return:
""" """
if ignored_keys is None:
ignored_keys = set()
response_queue = queue.Queue() response_queue = queue.Queue()
threads = [] threads = []
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment