зеркало из https://github.com/microsoft/ghcrawler.git
fix up empty context
This commit is contained in:
Родитель
2e7e5c08e4
Коммит
a3df9e0f49
|
@ -115,6 +115,7 @@ class Crawler {
|
|||
request.crawler = self;
|
||||
request.crawlerName = options.name;
|
||||
requestBox[0] = request;
|
||||
request.context = request.context || {};
|
||||
request.promises = [];
|
||||
return request;
|
||||
})
|
||||
|
@ -347,9 +348,8 @@ class Crawler {
|
|||
|
||||
_createQueuable(request) {
|
||||
// Create a new request data structure that has just the things we should queue
|
||||
const queuable = new Request(request.type, request.url);
|
||||
const queuable = new Request(request.type, request.url, request.context);
|
||||
queuable.attemptCount = request.attemptCount;
|
||||
queuable.context = request.context;
|
||||
queuable.force = request.force;
|
||||
queuable.subType = request.subType;
|
||||
return queuable;
|
||||
|
|
Загрузка…
Ссылка в новой задаче