зеркало из https://github.com/microsoft/ghcrawler.git
pr changes
This commit is contained in:
Родитель
6ed95beb71
Коммит
23056c8dc1
|
@ -496,14 +496,13 @@ class GitHubProcessor {
|
|||
}
|
||||
|
||||
traffic(request) {
|
||||
request.markNoSave();
|
||||
const document = request.document;
|
||||
const context = request.context;
|
||||
this._addResource(request, 'referrers', 'referrers', document.id, `${request.url}/traffic/popular/referrers`, null, `urn:repo:${document.id}`);
|
||||
this._addResource(request, 'paths', 'paths', document.id, `${request.url}/traffic/popular/paths`, null, `urn:repo:${document.id}`);
|
||||
this._addResource(request, 'views', 'views', document.id, `${request.url}/traffic/views`, null, `urn:repo:${document.id}`);
|
||||
this._addResource(request, 'clones', 'clones', document.id, `${request.url}/traffic/clones`, null, `urn:repo:${document.id}`);
|
||||
return request.document;
|
||||
request.queueChild('referrers', `${request.url}/traffic/popular/referrers`,`urn:repo:${document.id}`);
|
||||
request.queueChild('paths', `${request.url}/traffic/popular/paths`, `urn:repo:${document.id}`);
|
||||
request.queueChild('views', `${request.url}/traffic/views`,`urn:repo:${document.id}`);
|
||||
request.queueChild('clones', `${request.url}/traffic/clones`,`urn:repo:${document.id}`);
|
||||
return null;
|
||||
}
|
||||
|
||||
referrers(request) {
|
||||
|
@ -523,8 +522,9 @@ class GitHubProcessor {
|
|||
}
|
||||
|
||||
_trafficChild(request) {
|
||||
request.document.id = moment().utc().format('YYYY_MM_DD');
|
||||
request.document.id = moment.utc(request.document._metadata.fetchedAt).format('YYYY_MM_DD');
|
||||
request.addSelfLink();
|
||||
request.linkResource('repo', request.context.qualifier);
|
||||
return request.document;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче