fix data correction task execution error
This commit is contained in:
parent
06adad5fe9
commit
dcf17ff204
41
0007-fix-data-correction-task-execution-error.patch
Normal file
41
0007-fix-data-correction-task-execution-error.patch
Normal file
@ -0,0 +1,41 @@
|
||||
From fc2c7e76531306699e5c5dd0273dfe5fe521d2f8 Mon Sep 17 00:00:00 2001
|
||||
From: rabbitali <wenxin32@foxmail.com>
|
||||
Date: Tue, 24 Oct 2023 20:39:44 +0800
|
||||
Subject: [PATCH 2/2] fix data correction task execution error
|
||||
|
||||
---
|
||||
apollo/database/proxy/task.py | 2 +-
|
||||
conf/apollo_crontab.yml | 5 ++---
|
||||
2 files changed, 3 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/apollo/database/proxy/task.py b/apollo/database/proxy/task.py
|
||||
index b1d53c4..17cb274 100644
|
||||
--- a/apollo/database/proxy/task.py
|
||||
+++ b/apollo/database/proxy/task.py
|
||||
@@ -3214,7 +3214,7 @@ class TaskProxy(TaskMysqlProxy, TaskEsProxy):
|
||||
task_id_list = task_cve_id_list + task_repo_id_list
|
||||
|
||||
task_query = self.session.query(Task).filter(Task.task_id.in_(task_id_list)).all()
|
||||
- running_task_list = [(task.task_id, task.task_type, task.create_time) for task in task_query]
|
||||
+ running_task_list = [(task.task_id, task.create_time) for task in task_query]
|
||||
return running_task_list, host_info_list
|
||||
|
||||
def update_host_status(self, host_id_list: list):
|
||||
diff --git a/conf/apollo_crontab.yml b/conf/apollo_crontab.yml
|
||||
index 29c17b4..4a1f1e9 100644
|
||||
--- a/conf/apollo_crontab.yml
|
||||
+++ b/conf/apollo_crontab.yml
|
||||
@@ -44,6 +44,5 @@
|
||||
type: data_correct
|
||||
enable: true
|
||||
timed:
|
||||
- day_of_week: 0-6
|
||||
- hour: 3
|
||||
- trigger: cron
|
||||
\ No newline at end of file
|
||||
+ minutes: 20
|
||||
+ trigger: interval
|
||||
\ No newline at end of file
|
||||
--
|
||||
2.33.0
|
||||
|
||||
27
0008-update-apollo-database-proxy-host.py.patch
Normal file
27
0008-update-apollo-database-proxy-host.py.patch
Normal file
@ -0,0 +1,27 @@
|
||||
From a07a830d931dbcd60deb3c753414defe3e036a20 Mon Sep 17 00:00:00 2001
|
||||
From: xuyongliang_01 <xuyongliang_yewu@cmss.chinamobile.com>
|
||||
Date: Mon, 23 Oct 2023 06:35:14 +0000
|
||||
Subject: [PATCH 1/2] update apollo/database/proxy/host.py.
|
||||
|
||||
Signed-off-by: xuyongliang_01 <xuyongliang_yewu@cmss.chinamobile.com>
|
||||
---
|
||||
apollo/database/proxy/host.py | 3 ---
|
||||
1 file changed, 3 deletions(-)
|
||||
|
||||
diff --git a/apollo/database/proxy/host.py b/apollo/database/proxy/host.py
|
||||
index 2ce2005..282193b 100644
|
||||
--- a/apollo/database/proxy/host.py
|
||||
+++ b/apollo/database/proxy/host.py
|
||||
@@ -15,9 +15,6 @@ Time:
|
||||
Author:
|
||||
Description: Host table operation
|
||||
"""
|
||||
-import math
|
||||
-from collections import defaultdict
|
||||
-from typing import List, Tuple
|
||||
|
||||
from sqlalchemy import and_, case, func, or_
|
||||
from sqlalchemy.exc import SQLAlchemyError
|
||||
--
|
||||
2.33.0
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
Name: aops-apollo
|
||||
Version: v1.3.4
|
||||
Release: 7
|
||||
Release: 8
|
||||
Summary: Cve management service, monitor machine vulnerabilities and provide fix functions.
|
||||
License: MulanPSL2
|
||||
URL: https://gitee.com/openeuler/%{name}
|
||||
@ -11,6 +11,9 @@ Patch0003: 0003-fix-cve-list-get-api-query-error.patch
|
||||
Patch0004: 0004-fix-query-cve-list-error-and-sql-error.patch
|
||||
Patch0005: 0005-fix-the-severity-field-filtering-error.patch
|
||||
Patch0006: 0006-fix-cve-list-by-host-count.patch
|
||||
Patch0007: 0007-fix-data-correction-task-execution-error.patch
|
||||
Patch0008: 0008-update-apollo-database-proxy-host.py.patch
|
||||
|
||||
|
||||
BuildRequires: python3-setuptools
|
||||
Requires: aops-vulcanus >= v1.3.0
|
||||
@ -73,6 +76,9 @@ popd
|
||||
%{python3_sitelib}/aops_apollo_tool/*
|
||||
|
||||
%changelog
|
||||
* Tue Oct 24 2023 wenxin<wenxin32@foxmail.com> - v1.3.4-8
|
||||
- fix data correction task execution error
|
||||
|
||||
* Mon Oct 23 2023 gongzhengtang<gong_zhengtang@163.com> - v1.3.4-7
|
||||
- fixed the problem that the number of hosts in the cve list repeated statistics
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user