File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed
app/lib/package/api_export Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ void registerApiExporter(ApiExporter value) =>
3030/// The active API Exporter service or null if it hasn't been initialized.
3131ApiExporter ? get apiExporter => ss.lookup (#_apiExporter) as ApiExporter ? ;
3232
33- const _concurrency = 30 ;
33+ const _concurrency = 50 ;
3434
3535class ApiExporter {
3636 final ExportedApi _api;
@@ -134,6 +134,7 @@ class ApiExporter {
134134 Future <void > synchronizeExportedApi () async {
135135 final allPackageNames = < String > {};
136136 final packageQuery = dbService.query <Package >();
137+ var errCount = 0 ;
137138 await packageQuery.run ().parallelForEach (_concurrency, (pkg) async {
138139 final name = pkg.name! ;
139140 if (pkg.isNotVisible) {
@@ -143,6 +144,9 @@ class ApiExporter {
143144
144145 // TODO: Consider retries around all this logic
145146 await synchronizePackage (name);
147+ }, onError: (e, st) {
148+ _log.warning ('synchronizePackage() failed' , e, st);
149+ errCount++ ;
146150 });
147151
148152 await synchronizePackageNameCompletionData ();
@@ -157,6 +161,12 @@ class ApiExporter {
157161 });
158162
159163 await _api.garbageCollect (allPackageNames);
164+
165+ if (errCount > 0 ) {
166+ throw Exception (
167+ '$errCount exceptions happened while calling synchronizeExportedApi' ,
168+ );
169+ }
160170 }
161171
162172 /// Sync package and into [ExportedApi] , this will synchronize package into
Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ const _minGarbageAge = Duration(hours: 3);
4444/// All writes to the bucket containing the exported API should go through this
4545/// interface.
4646final class ExportedApi {
47- final Pool _pool = Pool (50 );
47+ final Pool _pool = Pool (80 );
4848 final Storage _storage;
4949 final Bucket _bucket;
5050 final List <String > _prefixes = [
You can’t perform that action at this time.
0 commit comments