Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
opms-command
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
赵凯
opms-command
Commits
4fee601a
Commit
4fee601a
authored
Apr 09, 2024
by
赵凯
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
738173be
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
3 deletions
+12
-3
task_patch_api.py
apis/task_patch_api.py
+12
-3
No files found.
apis/task_patch_api.py
View file @
4fee601a
...
...
@@ -78,14 +78,23 @@ def tasksPatch(taskid):
'cookie'
:
cookie
}
response
=
requests
.
request
(
"PATCH"
,
url
,
headers
=
headers
,
data
=
payload
)
print
(
response
)
rst
=
json
.
loads
(
response
.
text
)
print
(
response
)
# Check if request was successful
if
response
.
status_code
==
200
:
# Do something with the response data if needed
response_data
=
response
.
json
()
print
(
response_data
)
return
response_data
else
:
# Handle potential errors
response
.
raise_for_status
()
print
(
"debug - 执行异常,退出"
)
# print("任务开始执行...")
# if rst['code'] == -1:
# print("任务执行异常:" + rst['msg'])
# 集群部署任务
def
taskMultiZone
(
taskid
,
target_k8
):
cookie
=
getToken
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment