Skip to content

Instantly share code, notes, and snippets.

@ArturSkowronski
Last active August 9, 2018 16:46
Show Gist options
  • Save ArturSkowronski/bd7fdaa3595f3707422c86c03eb0818f to your computer and use it in GitHub Desktop.
Save ArturSkowronski/bd7fdaa3595f3707422c86c03eb0818f to your computer and use it in GitHub Desktop.
class PushBlobStep implements AsyncStep<BlobDescriptor>, Callable<BlobDescriptor> {
/*(...)*/
public BlobDescriptor call() throws IOException, RegistryException, ExecutionException {
/*(...)*/
RegistryClient registryClient =/*(...)*/
if (registryClient.checkBlob(blobDescriptor.getDigest()) != null) {
/*(...)*/
return blobDescriptor;
}
registryClient.pushBlob(blobDescriptor.getDigest(), blob);
return blobDescriptor;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment