in server/src/main/java/jetbrains/buildServer/torrent/ArtifactProcessorImpl.java [38:61]
public void processArtifacts(@NotNull List<BuildArtifact> artifacts) {
artifacts.forEach(artifact -> {
if (artifact.isDirectory()) {
return;
}
if (!myConfigurator.isSeedingEnabled()) {
return;
}
String artifactRelativePath = artifact.getRelativePath();
Path fullPath = myArtifactsDirectory.resolve(artifactRelativePath);
if (!Files.exists(fullPath)) {
LOG.debug(String.format("File '%s' doesn't exist. Won't create a torrent for it", fullPath.toString()));
return;
}
Path torrent = findTorrent(fullPath, artifactRelativePath);
if (!Files.exists(torrent)) {
LOG.debug(String.format("torrent file for artifact %s doesn't exist", artifactRelativePath));
return;
}
myTorrentsSeeder.registerSrcAndTorrentFile(fullPath.toFile(), torrent.toFile(), true);
});
}