Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
sb_h5
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
sb_h5
Commits
59bb5c94
Commit
59bb5c94
authored
Dec 02, 2019
by
姜登
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
taskid
parent
cb5c0800
Pipeline
#17645
passed with stage
in 18 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
task.js
app/controller/task.js
+5
-5
No files found.
app/controller/task.js
View file @
59bb5c94
...
...
@@ -69,7 +69,7 @@ class TaskController extends Controller {
callbackUrl
:
config
.
callbackUrl
,
});
await
service
.
cache
.
set
({
key
:
taskId
,
key
:
String
(
taskId
)
,
value
:
{
status
:
'init'
,
note
:
{
message
:
'init'
}
},
});
ctx
.
success
(
taskId
);
...
...
@@ -91,7 +91,7 @@ class TaskController extends Controller {
const
{
ctx
,
service
}
=
this
;
ctx
.
validate
(
this
.
taskIdRule
,
ctx
.
params
);
const
{
taskId
}
=
ctx
.
params
;
const
data
=
await
service
.
cache
.
get
({
key
:
taskId
});
const
data
=
await
service
.
cache
.
get
({
key
:
String
(
taskId
)
});
ctx
.
success
(
data
);
}
...
...
@@ -99,7 +99,7 @@ class TaskController extends Controller {
async
handleCallback
()
{
const
{
ctx
,
service
}
=
this
;
const
{
taskId
}
=
ctx
.
request
.
body
;
const
result
=
await
service
.
task
.
fetchTask
({
taskId
});
const
result
=
await
service
.
task
.
fetchTask
({
taskId
:
String
(
taskId
)
});
// ctx.success();
// ctx.status = 200;
ctx
.
body
=
'ok'
;
...
...
@@ -136,7 +136,7 @@ class TaskController extends Controller {
};
try
{
const
insertData
=
await
service
.
washData
.
wash
(
result
);
const
order
=
await
service
.
order
.
getOneByTaskId
(
taskId
);
const
order
=
await
service
.
order
.
getOneByTaskId
(
String
(
taskId
)
);
if
(
!
order
)
{
throw
new
Error
(
`【taskId】:
${
taskId
}
任务已经结束.`
);
}
...
...
@@ -165,7 +165,7 @@ class TaskController extends Controller {
break
;
}
await
service
.
cache
.
set
({
key
:
taskId
,
key
:
String
(
taskId
)
,
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