Commit b8e3e0b6 authored by Thomas Urban's avatar Thomas Urban

preventing URL grabber keeping to dump stats when finished

parent 797b2f4f
......@@ -274,10 +274,11 @@ new Promise( resolve => {
return list;
}
const grabber = new Client( "grabber" );
return new Promise( ( resolve, reject ) => {
const inQueue = [StartUrl];
const results = {};
const grabber = new Client( "grabber" );
grab( inQueue, results );
......@@ -339,6 +340,8 @@ new Promise( resolve => {
}
} )
.then( list => {
clearInterval( grabber.statsTimer );
File.writeFileSync( cacheFile, list.join( process.platform === "win32" ? "\r\n" : "\n" ) );
return list;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment