Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zhichan
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
蒋勇
zhichan
Commits
bf627bc7
Commit
bf627bc7
authored
Dec 24, 2019
by
蒋勇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d
parent
b98fc42a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
7 deletions
+11
-7
taskexecutor/app/base/db/task/rpt/parseRptTask.js
+11
-7
taskexecutor/app/base/db/task/rpt/tmtransferTask.js
+0
-0
No files found.
taskexecutor/app/base/db/task/
test/tes
tTask.js
→
taskexecutor/app/base/db/task/
rpt/parseRp
tTask.js
View file @
bf627bc7
const
TaskBase
=
require
(
"../../task.base"
);
class
Tes
tTask
extends
TaskBase
{
class
ParseRp
tTask
extends
TaskBase
{
constructor
(){
super
(
TaskBase
.
getServiceName
(
Tes
tTask
));
super
(
TaskBase
.
getServiceName
(
ParseRp
tTask
));
this
.
cacheData
=
[];
}
async
subBeforeTask
(
params
){
...
...
@@ -13,18 +13,22 @@ class TestTask extends TaskBase{
async
subTaskHandle
(
channel
,
message
){
var
x
=
await
this
.
redisClient
.
rpop
(
message
);
if
(
x
){
console
.
log
(
"cache"
+
x
);
this
.
cacheData
.
push
(
x
);
}
setImmediate
(()
=>
{
this
.
paseXls
();
await
this
.
paseXls
();
});
}
async
paseXls
(){
var
pv
=
this
.
cacheData
.
pop
();
if
(
pv
){
console
.
log
(
pv
);
this
.
sleep
(
5000
);
var
tohandleurls
=
pv
.
split
(
"~"
);
var
rptDate
=
tohandleurls
[
0
];
var
rptCode
=
tohandleurls
[
1
];
var
urldownload
=
tohandleurls
[
2
];
//下载文件
this
.
paseXls
();
}
}
...
...
@@ -33,4 +37,4 @@ class TestTask extends TaskBase{
console
.
log
(
"TestTask1....."
);
}
}
module
.
exports
=
Tes
tTask
;
module
.
exports
=
ParseRp
tTask
;
taskexecutor/app/base/db/task/
tes
t/tmtransferTask.js
→
taskexecutor/app/base/db/task/
rp
t/tmtransferTask.js
View file @
bf627bc7
File moved
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