Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
DA-Platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
文档服务地址:
http://47.92.0.57:3000/
周报索引地址:
http://47.92.0.57:3000/s/NruNXRYmV
Open sidebar
Berlin
DA-Platform
Commits
f492b242
Commit
f492b242
authored
Aug 31, 2020
by
王腾
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' of
https://gitlab.redhtc.com/Berlincen/DA-Platform
into develop
parents
42b59b72
27c68064
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
0 deletions
+24
-0
task.py
DAPlatform/views/task.py
+24
-0
No files found.
DAPlatform/views/task.py
View file @
f492b242
...
...
@@ -270,3 +270,27 @@ def finish_task():
'data'
:
ret
.
data
}
return
json
.
dumps
(
res
)
# 终止任务
@task.route
(
"/terminateTask"
,
methods
=
[
"Post"
])
def
terminate_task
():
userId
=
int
(
request
.
args
[
'userId'
])
taskId
=
request
.
args
[
'taskId'
]
task
=
Task
.
find_task_by_id
(
taskId
)
if
task
.
publish_id
==
userId
:
Task
.
set_state
(
taskId
,
'terminate'
)
res
=
{
'code'
:
1
,
'message'
:
"terminate success"
,
'data'
:
{}
}
return
json
.
dumps
(
res
)
else
:
res
=
{
'code'
:
0
,
'message'
:
"terminate failed"
,
'data'
:
{}
}
return
json
.
dumps
(
res
)
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