Skip to content

Commit

Permalink
Move getting the blobId closer to its actual use. (#8087)
Browse files Browse the repository at this point in the history
  • Loading branch information
isoos committed Sep 30, 2024
1 parent 4ce0164 commit aaca5b9
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions pkg/pub_worker/lib/src/analyze.dart
Original file line number Diff line number Diff line change
Expand Up @@ -164,13 +164,6 @@ Future<void> _analyzePackage(
log.writeln('STOPPED: ${clock.now().toUtc().toIso8601String()}');
}

// Upload results, if there is any
_log.info('api.taskUploadResult("$package", "$version")');
final r = await retry(
() => api.taskUploadResult(package, version),
retryIf: _retryIf,
);

// Create a file to store the blob, and add everything to it.
final blobFile = File(p.join(tempDir.path, 'files.blob'));
final builder = IndexedBlobBuilder(blobFile.openWrite());
Expand Down Expand Up @@ -201,6 +194,13 @@ Future<void> _analyzePackage(
logFile.openRead().transform(gzip.encoder),
);

// Upload results, if there is any
_log.info('api.taskUploadResult("$package", "$version")');
final r = await retry(
() => api.taskUploadResult(package, version),
retryIf: _retryIf,
);

// Create BlobIndex
final index = await builder.buildIndex(r.blobId);

Expand Down

0 comments on commit aaca5b9

Please sign in to comment.