File tree Expand file tree Collapse file tree 3 files changed +21
-20
lines changed Expand file tree Collapse file tree 3 files changed +21
-20
lines changed Original file line number Diff line number Diff line change @@ -1136,19 +1136,19 @@ export function createCrawlFile(xCrawlConfig: LoaderXCrawlConfig) {
1136
1136
errorIds . push ( item . id )
1137
1137
}
1138
1138
} )
1139
- log ( 'Save file final result :' )
1139
+ log ( 'Save statistics for the targets :' )
1140
1140
log (
1141
1141
logSuccess (
1142
- ` Success - total: ${ succssIds . length } , ids: [ ${ succssIds . join (
1143
- ' - '
1144
- ) } ]`
1142
+ ` Success - target total: ${
1143
+ succssIds . length
1144
+ } , targets id: [ ${ succssIds . join ( ', ' ) } ]`
1145
1145
)
1146
1146
)
1147
1147
log (
1148
1148
logError (
1149
- ` Error - total: ${ errorIds . length } , ids: [ ${ errorIds . join (
1150
- ' - '
1151
- ) } ]`
1149
+ ` Error - target total: ${
1150
+ errorIds . length
1151
+ } , targets id: [ ${ errorIds . join ( ', ' ) } ]`
1152
1152
)
1153
1153
)
1154
1154
Original file line number Diff line number Diff line change @@ -14,15 +14,11 @@ async function useSleepByBatch(
14
14
? intervalTime
15
15
: random ( intervalTime . max , intervalTime . min )
16
16
17
- log (
18
- `Id: ${ logNumber ( id ) } - Crawl needs to sleep for ${ logNumber (
19
- timeout + 'ms'
20
- ) } milliseconds before sending`
21
- )
17
+ log ( `Target id: ${ logNumber ( id ) } - sleep: ${ logNumber ( timeout + 'ms' ) } ` )
22
18
23
19
await sleep ( timeout )
24
20
} else {
25
- log ( `Id : ${ logNumber ( id ) } - Crawl does not need to sleep, send immediately ` )
21
+ log ( `Target id : ${ logNumber ( id ) } - sleep: ${ logNumber ( '0ms' ) } ` )
26
22
}
27
23
}
28
24
Original file line number Diff line number Diff line change @@ -138,7 +138,7 @@ export async function controller<
138
138
log (
139
139
`${ logSuccess ( `Start crawling` ) } - name: ${ logWarn ( name ) } , mode: ${ logWarn (
140
140
mode
141
- ) } , total: ${ logNumber ( devices . length ) } `
141
+ ) } , target total: ${ logNumber ( devices . length ) } `
142
142
)
143
143
144
144
// 选择爬取模式
@@ -203,8 +203,11 @@ export async function controller<
203
203
204
204
return item . id
205
205
} )
206
+
206
207
log (
207
- logWarn ( `Retry: ${ ++ i } - Ids to retry: [ ${ retriedIds . join ( ' - ' ) } ]` )
208
+ logWarn (
209
+ `Start retrying: ${ ++ i } - Targets id: [ ${ retriedIds . join ( ' - ' ) } ]`
210
+ )
208
211
)
209
212
}
210
213
}
@@ -220,17 +223,19 @@ export async function controller<
220
223
}
221
224
} )
222
225
223
- log ( 'Crawl the final result :' )
226
+ log ( 'Crawl statistics of the targets :' )
224
227
log (
225
228
logSuccess (
226
- ` Success - total: ${ succssIds . length } , ids: [ ${ succssIds . join (
227
- ' - '
228
- ) } ]`
229
+ ` Success - target total: ${
230
+ succssIds . length
231
+ } , targets id: [ ${ succssIds . join ( ', ' ) } ]`
229
232
)
230
233
)
231
234
log (
232
235
logError (
233
- ` Error - total: ${ errorIds . length } , ids: [ ${ errorIds . join ( ' - ' ) } ]`
236
+ ` Error - target total: ${
237
+ errorIds . length
238
+ } , targets id: [ ${ errorIds . join ( ', ' ) } ]`
234
239
)
235
240
)
236
241
You can’t perform that action at this time.
0 commit comments