Skip to content

Commit

Permalink
Fix references
Browse files Browse the repository at this point in the history
  • Loading branch information
HardNorth committed Nov 21, 2024
1 parent ea3d56a commit c57b5e2
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion app/commons/esclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ def _to_index_bodies(
if log.logLevel < utils.ERROR_LOGGING_LEVEL or not log.message.strip():
continue

bodies.append(log_requests.prepare_log(launch, test_item, log, project_with_prefix))
bodies.append(request_factory.prepare_log(launch, test_item, log, project_with_prefix))
logs_added = True
if logs_added:
test_item_ids.append(str(test_item.testItemId))
Expand Down
2 changes: 1 addition & 1 deletion app/service/auto_analyzer_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ def _query_elasticsearch(self, launches: list[Launch], max_batch_size=30):
logger.info("Early finish from analyzer before timeout")
break
unique_logs = text_processing.leave_only_unique_logs(test_item.logs)
prepared_logs = [log_requests.prepare_log(launch, test_item, log, index_name)
prepared_logs = [request_factory.prepare_log(launch, test_item, log, index_name)
for log in unique_logs if log.logLevel >= utils.ERROR_LOGGING_LEVEL]
results, _ = log_merger.decompose_logs_merged_and_without_duplicates(prepared_logs)

Expand Down
2 changes: 1 addition & 1 deletion app/service/cluster_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ def find_clusters(self, launch_info: LaunchInfoForClustering):
log_ids = {}
try:
unique_errors_min_should_match = launch_info.launch.analyzerConfig.uniqueErrorsMinShouldMatch / 100.0 # noqa
prepared_logs = log_requests.prepare_logs_for_clustering(launch_info.launch, index_name)
prepared_logs = request_factory.prepare_logs_for_clustering(launch_info.launch, index_name)
log_messages, log_dict, log_ids_for_merged_logs = log_merger.merge_logs(
prepared_logs, launch_info.numberOfLogLines, launch_info.cleanNumbers)
log_ids = set([str(log["_id"]) for log in log_dict.values()])
Expand Down
2 changes: 1 addition & 1 deletion app/service/namespace_finder_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def __init__(self, app_config: ApplicationConfig):
def update_chosen_namespaces(self, launches: list[Launch]):
logger.info("Started updating chosen namespaces")
t_start = time()
log_words, project_id = log_requests.prepare_log_words(launches)
log_words, project_id = request_factory.prepare_log_words(launches)
logger.debug(f'Project id {project_id}')
if project_id is not None:
self.namespace_finder.update_namespaces(project_id, log_words)
Expand Down
4 changes: 2 additions & 2 deletions app/service/search_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,8 @@ def prepare_messages_for_queries(self, search_req):
if not message.strip():
continue

queried_log = log_requests.create_log_template()
queried_log = log_requests._fill_log_fields(
queried_log = request_factory.create_log_template()
queried_log = request_factory._fill_log_fields(
queried_log, Log(logId=global_id, message=message), search_req.logLines)

msg_words = " ".join(text_processing.split_words(queried_log["_source"]["message"]))
Expand Down
2 changes: 1 addition & 1 deletion app/service/suggest_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ def prepare_logs_for_suggestions(self, test_item_info: TestItemInfo, index_name:
prepared_logs, test_item_id_for_suggest = self.query_logs_for_cluster(test_item_info, index_name)
else:
unique_logs = text_processing.leave_only_unique_logs(test_item_info.logs)
prepared_logs = [log_requests.prepare_log_for_suggests(test_item_info, log, index_name)
prepared_logs = [request_factory.prepare_log_for_suggests(test_item_info, log, index_name)
for log in unique_logs if log.logLevel >= utils.ERROR_LOGGING_LEVEL]
logs, _ = log_merger.decompose_logs_merged_and_without_duplicates(prepared_logs)
return logs, test_item_id_for_suggest
Expand Down

0 comments on commit c57b5e2

Please sign in to comment.