Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
马玮
/
carspider
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
bbed0bde
authored
Aug 28, 2017
by
马玮
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Op maxLogSize for test
parent
a296a1b3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
4 deletions
+6
-4
README.md
+2
-2
lib/DI.js
+2
-1
lib/helpers/Dealer.js
+2
-1
No files found.
README.md
View file @
bbed0bde
...
...
@@ -17,8 +17,8 @@ sudo yum install redis
## How to use
```
1.node accountTool.js -t saveAccount -d 1 -w autohome -u 河南明志汽车大迈8054 -p hnmz147852.
2.
node boot.js -t fetchClues -T
1
1.node accountTool.js -t saveAccount -d
5127
1 -w autohome -u 河南明志汽车大迈8054 -p hnmz147852.
2.
LOG_LEVEL='debug' LOG_TYPE='console' node boot.js -t fetchClues -a
1
```
## To do list:
...
...
lib/DI.js
View file @
bbed0bde
...
...
@@ -23,10 +23,11 @@ class DI {
static
getLogger
()
{
const
level
=
process
.
env
.
LOG_LEVEL
||
'info'
;
const
appenders
=
(
process
.
env
.
LOG_TYPE
?
process
.
env
.
LOG_TYPE
.
split
(
','
)
:
null
)
||
[
'console'
,
'carspider'
];
// maxLogSize: 10485760
log4js
.
configure
({
appenders
:
{
console
:
{
type
:
'console'
},
carspider
:
{
type
:
'file'
,
filename
:
'logs/dealer/carspider.log'
,
maxLogSize
:
10
48576
0
,
backups
:
3
,
compress
:
true
},
carspider
:
{
type
:
'file'
,
filename
:
'logs/dealer/carspider.log'
,
maxLogSize
:
10
24
0
,
backups
:
3
,
compress
:
true
},
},
categories
:
{
default
:
{
appenders
:
appenders
,
level
:
level
}
...
...
lib/helpers/Dealer.js
View file @
bbed0bde
...
...
@@ -386,7 +386,8 @@ class DealerHelper {
const
sql
=
`INSERT INTO crm_dealer_thirdparty_account SET
dealerID = ?, website = ?, username = ?, password = ?, createdAt = UNIX_TIMESTAMP()
ON DUPLICATE KEY UPDATE
id = LAST_INSERT_ID(id), username = VALUES(username), password = VALUES(password)`
;
id = LAST_INSERT_ID(id), username = VALUES(username), password = VALUES(password),
updatedAt = UNIX_TIMESTAMP()`
;
const
replacements
=
[
params
.
dealerID
,
params
.
website
,
params
.
username
,
params
.
password
];
console
.
log
(
replacements
);
const
connection
=
await
DI
.
getConnection
(
'MASTER_CRM'
);
...
...
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