Skip to content

Commit

Permalink
Merge pull request #113 from pelias/joxit/fix-stats
Browse files Browse the repository at this point in the history
Fix stats since we stops the use of type
  • Loading branch information
orangejulius authored Sep 27, 2019
2 parents 1415360 + 1622628 commit 1003f7f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/BatchManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,11 @@ BatchManager.prototype._dispatch = function( batch, next ){

batch._slots.forEach( function( task ){
if( task.status < 299 ){
if( !types.hasOwnProperty( task.cmd.index._type ) ){
types[ task.cmd.index._type ] = 0;
const type = task.data.layer || task.cmd.index._type;
if( !types.hasOwnProperty( type ) ){
types[ type ] = 0;
}
types[ task.cmd.index._type ]++;
types[ type ]++;
} else {
failures++;
}
Expand Down

0 comments on commit 1003f7f

Please sign in to comment.