add interface to check repository result
This commit is contained in:
parent
f9e0e6cdd2
commit
4e9ba11237
46
0049-add-interface-to-check-repository-result.patch
Normal file
46
0049-add-interface-to-check-repository-result.patch
Normal file
@ -0,0 +1,46 @@
|
||||
From 7cbf75c501a0c8bc21c2c9ca041b3f283ec4a0ca Mon Sep 17 00:00:00 2001
|
||||
From: lixin <lixinb@uniontech.com>
|
||||
Date: Fri, 10 Nov 2023 15:07:45 +0800
|
||||
Subject: [PATCH] =?UTF-8?q?=E8=8E=B7=E5=8F=96=E8=BD=AF=E4=BB=B6=E4=BB=93?=
|
||||
=?UTF-8?q?=E5=BA=93=E6=A3=80=E6=B5=8B=E7=BB=93=E6=9E=9C=E6=8E=A5=E5=8F=A3?=
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
---
|
||||
index.py | 12 ++++++++++++
|
||||
1 file changed, 12 insertions(+)
|
||||
|
||||
diff --git a/index.py b/index.py
|
||||
index 9665e29..d76404e 100644
|
||||
--- a/index.py
|
||||
+++ b/index.py
|
||||
@@ -32,6 +32,7 @@ mods = {
|
||||
'check_kernel': migration.check_kernel,
|
||||
'get_kernel_data': server.get_kernel_data,
|
||||
'check_repo': migration.check_repo,
|
||||
+ 'get_repo_data': server.get_repo_data,
|
||||
}
|
||||
|
||||
|
||||
@@ -133,6 +134,17 @@ def check_repo():
|
||||
return Response(mod, content_type='application/json')
|
||||
|
||||
|
||||
+@app.route('/get_repo_data', methods=['GET', 'POST'])
|
||||
+def get_repo_data():
|
||||
+ """
|
||||
+ 定时检查软件仓库检测结果
|
||||
+ :return:
|
||||
+ """
|
||||
+ mod = check_methods()
|
||||
+ if mod:
|
||||
+ return Response(mod, content_type='application/json')
|
||||
+
|
||||
+
|
||||
@app.route('/', methods=['GET', 'POST'])
|
||||
def MT_index():
|
||||
"""
|
||||
--
|
||||
2.20.1
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
Name: migration-tools
|
||||
Version: 1.0.2
|
||||
Release: 48
|
||||
Release: 49
|
||||
License: MulanPSL-2.0
|
||||
Summary: A tool to help users migrate the Centos system to the UOS system and openEuler system
|
||||
Source0: %{name}-%{version}.tar.gz
|
||||
@ -55,7 +55,7 @@ Patch45: 0045-modify-repository-file.patch
|
||||
Patch46: 0046-agent-sends-task-update-requrst-to-the-server.patch
|
||||
Patch47: 0047-check-kernel-version-in-repository.patch
|
||||
Patch48: 0048-server-send-kernel-detection-task.patch
|
||||
|
||||
Patch49: 0049-add-interface-to-check-repository-result.patch
|
||||
|
||||
BuildArch: noarch
|
||||
BuildRequires: systemd
|
||||
@ -154,6 +154,9 @@ rm -rf /usr/bin/migration-tools
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Tue Nov 5 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-49
|
||||
- 0049-add-interface-to-check-repository-result.patch
|
||||
|
||||
* Tue Nov 5 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-48
|
||||
- 0048-server-send-kernel-detection-task.patch
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user