File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
lib/service/download_counts
test/service/download_counts Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -72,6 +72,7 @@ Future<Set<String>> processDownloadCounts(DateTime date) async {
7272 }
7373
7474 final processedPackages = < String > {};
75+ final processedPackagesWithErrors = < String > {};
7576 final pool = Pool (10 );
7677 for (final f in bucketEntries) {
7778 final fileName = f.name;
@@ -169,6 +170,7 @@ Future<Set<String>> processDownloadCounts(DateTime date) async {
169170 '$package -$version appeared in download counts data but does'
170171 ' not exist' );
171172 }
173+ processedPackagesWithErrors.add (package);
172174 }
173175 });
174176
@@ -183,6 +185,7 @@ Future<Set<String>> processDownloadCounts(DateTime date) async {
183185 'Package $package appeared in download counts data for file '
184186 '$fileName but does not exist.\n '
185187 'Error: $e ' );
188+ processedPackagesWithErrors.add (package);
186189 return ;
187190 } // else {
188191 // The package is either invisible, tombstoned or has no versions.
@@ -215,6 +218,12 @@ Future<Set<String>> processDownloadCounts(DateTime date) async {
215218 });
216219 }));
217220
221+ final filesString = bucketEntries.length == 1 ? 'file' : 'files' ;
222+ _logger.info ('Finished processing download counts for date $date :' );
223+ _logger.info (' - ${failedFiles .length } out of ${bucketEntries .length } '
224+ '$filesString failed during processing.' );
225+ _logger.info (' - ${processedPackages .length } packages processed including '
226+ '${processedPackagesWithErrors .length } packages with errors.' );
218227 return failedFiles;
219228}
220229
Original file line number Diff line number Diff line change @@ -376,9 +376,8 @@ void main() {
376376 } finally {
377377 await subscription.cancel ();
378378 }
379-
380379 expect (
381- messages.first ,
380+ messages[messages.length - 2 ] ,
382381 contains ('Failed to read any files with prefix '
383382 '"daily_download_counts/'
384383 '${formatDateForFileName (skippedDate )}'
You can’t perform that action at this time.
0 commit comments