Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
egg-puppeteer
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
ui
egg-puppeteer
Commits
66b1b5eb
Commit
66b1b5eb
authored
May 19, 2020
by
郝聪敏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
上线配置
parent
381accb4
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
7 deletions
+11
-7
send_mail.js
app/schedule/send_mail.js
+5
-5
home.js
app/service/home.js
+1
-1
config.default.js
config/config.default.js
+5
-1
No files found.
app/schedule/send_mail.js
View file @
66b1b5eb
...
...
@@ -2,13 +2,13 @@
module
.
exports
=
{
schedule
:
{
cron
:
'
*/10 * *
* * *
'
,
cron
:
'
0 0 10,11,12,15,16,17,18,19,20
* * *
'
,
type
:
'
worker
'
,
immediate
:
true
,
},
async
task
()
{
//
ctx.logger.info('定时任务开始');
//
await ctx.service.home.schedule();
//
ctx.logger.info('定时任务结束');
async
task
(
ctx
)
{
ctx
.
logger
.
info
(
'
定时任务开始
'
);
await
ctx
.
service
.
home
.
schedule
();
ctx
.
logger
.
info
(
'
定时任务结束
'
);
},
};
app/service/home.js
View file @
66b1b5eb
...
...
@@ -419,7 +419,7 @@ const validate = result => {
class
HomeService
extends
Service
{
async
getMails
()
{
const
{
ctx
}
=
this
;
const
limit
=
1
50
;
const
limit
=
50
;
console
.
log
(
`
${
ctx
.
app
.
config
.
legal
.
host
}
/api/email/get/
${
limit
}
`
);
const
{
data
:
result
}
=
await
ctx
.
curl
(
`
${
ctx
.
app
.
config
.
legal
.
host
}
/api/email/get/
${
limit
}
`
,
{
dataType
:
'
json
'
,
...
...
config/config.default.js
View file @
66b1b5eb
...
...
@@ -59,7 +59,7 @@ module.exports = appInfo => {
},
},
legal
:
{
host
:
'
http
s://adanos-fe.liangkebang.net
'
,
host
:
'
http
://back-law-urge.q-gp.com
'
,
},
};
...
...
@@ -71,6 +71,10 @@ module.exports = appInfo => {
host
:
'
tracker-fdfs1.quantgroups.com
'
,
port
:
22122
,
},
{
host
:
'
tracker-fdfs2.quantgroups.com
'
,
port
:
22122
,
},
],
// 默认超时时间10s
timeout
:
10000
,
...
...
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