Skip to content

Commit aaca5b9

Browse files
authored
Move getting the blobId closer to its actual use. (#8087)
1 parent 4ce0164 commit aaca5b9

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

pkg/pub_worker/lib/src/analyze.dart

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -164,13 +164,6 @@ Future<void> _analyzePackage(
164164
log.writeln('STOPPED: ${clock.now().toUtc().toIso8601String()}');
165165
}
166166

167-
// Upload results, if there is any
168-
_log.info('api.taskUploadResult("$package", "$version")');
169-
final r = await retry(
170-
() => api.taskUploadResult(package, version),
171-
retryIf: _retryIf,
172-
);
173-
174167
// Create a file to store the blob, and add everything to it.
175168
final blobFile = File(p.join(tempDir.path, 'files.blob'));
176169
final builder = IndexedBlobBuilder(blobFile.openWrite());
@@ -201,6 +194,13 @@ Future<void> _analyzePackage(
201194
logFile.openRead().transform(gzip.encoder),
202195
);
203196

197+
// Upload results, if there is any
198+
_log.info('api.taskUploadResult("$package", "$version")');
199+
final r = await retry(
200+
() => api.taskUploadResult(package, version),
201+
retryIf: _retryIf,
202+
);
203+
204204
// Create BlobIndex
205205
final index = await builder.buildIndex(r.blobId);
206206

0 commit comments

Comments
 (0)