Skip to content

Commit

Permalink
Adjust RKSearchIndexer logging to ensure output is emitted when the…
Browse files Browse the repository at this point in the history
… indexer hits 100%
  • Loading branch information
blakewatters committed Feb 19, 2013
1 parent 80b3cd3 commit 45c7029
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Code/Search/RKSearchIndexer.m
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ - (void)indexChangedObjectsInManagedObjectContext:(NSManagedObjectContext *)mana
if ([indexedIDs containsObject:[managedObject objectID]]) return;
[indexedIDs addObject:[managedObject objectID]];
double percentage = (((float)[indexedIDs count]) / (float)totalObjects) * 100;
if ([indexedIDs count] % 250 == 0) RKLogInfo(@"Indexing object %ld of %ld (%.2f%% complete)", (unsigned long) [indexedIDs count], (unsigned long) totalObjects, percentage);
if ([indexedIDs count] % 250 == 0 || percentage >= 100.0) RKLogInfo(@"Indexing object %ld of %ld (%.2f%% complete)", (unsigned long) [indexedIDs count], (unsigned long) totalObjects, percentage);
}];
}

Expand Down

0 comments on commit 45c7029

Please sign in to comment.