Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
taxh5
Project
Project
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
Open sidebar
data_server
taxh5
Commits
d0f003e2
Commit
d0f003e2
authored
Dec 02, 2019
by
姜登
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
taskid
parent
0089c67e
Pipeline
#17644
passed with stage
in 4 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
task.js
app/controller/task.js
+4
-4
No files found.
app/controller/task.js
View file @
d0f003e2
...
@@ -44,7 +44,7 @@ class TaskController extends Controller {
...
@@ -44,7 +44,7 @@ class TaskController extends Controller {
const
taskId
=
await
service
.
task
.
create
({
scriptId
});
const
taskId
=
await
service
.
task
.
create
({
scriptId
});
await
service
.
order
.
update
({
orderId
,
cityId
:
scriptId
,
taskId
});
await
service
.
order
.
update
({
orderId
,
cityId
:
scriptId
,
taskId
});
await
service
.
cache
.
set
({
await
service
.
cache
.
set
({
key
:
taskId
,
key
:
String
(
taskId
)
,
value
:
{
status
:
'init'
,
note
:
{
message
:
'init'
}},
value
:
{
status
:
'init'
,
note
:
{
message
:
'init'
}},
});
});
ctx
.
success
({
taskId
});
ctx
.
success
({
taskId
});
...
@@ -55,7 +55,7 @@ class TaskController extends Controller {
...
@@ -55,7 +55,7 @@ class TaskController extends Controller {
ctx
.
validate
(
this
.
submitRule
);
ctx
.
validate
(
this
.
submitRule
);
const
{
taskId
}
=
ctx
.
params
;
const
{
taskId
}
=
ctx
.
params
;
await
service
.
cache
.
set
({
await
service
.
cache
.
set
({
key
:
taskId
,
key
:
String
(
taskId
)
,
value
:
{
status
:
'init'
,
note
:
{
message
:
'init'
}},
value
:
{
status
:
'init'
,
note
:
{
message
:
'init'
}},
});
});
await
service
.
task
.
submit
({
await
service
.
task
.
submit
({
...
@@ -132,7 +132,7 @@ class TaskController extends Controller {
...
@@ -132,7 +132,7 @@ class TaskController extends Controller {
note
:
{
message
:
'task success'
},
note
:
{
message
:
'task success'
},
};
};
try
{
try
{
const
order
=
await
service
.
order
.
getOneByTaskId
(
taskId
);
const
order
=
await
service
.
order
.
getOneByTaskId
(
String
(
taskId
)
);
if
(
!
order
)
{
if
(
!
order
)
{
throw
new
Error
(
'任务已经结束了'
);
throw
new
Error
(
'任务已经结束了'
);
}
}
...
@@ -167,7 +167,7 @@ class TaskController extends Controller {
...
@@ -167,7 +167,7 @@ class TaskController extends Controller {
break
;
break
;
}
}
await
service
.
cache
.
set
({
await
service
.
cache
.
set
({
key
:
taskId
,
key
:
String
(
taskId
)
,
value
:
taskNote
,
value
:
taskNote
,
});
});
}
}
...
...
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