if (shouldYield()) {
log.info("yielding to priority tasks");
return;
}
final ConfigEntry entry = configEntry();
final String comboId = entry.comboId();
final AmazonService amazonService = entry.amazonService();
final List<String> repoList = RepoHelp.repoList(repoRegistry, comboId);
for (final String repoId : repoList) {
checkInterruption();
doSleep(scannerRepositorySleepTime());
final Repository repo = repoRegistry.getRepository(repoId);
final File root = RepoHelp.repoRoot(repo);
final Listener listener = new ListenerSupport() {
@Override
public void onBegin() {
log.info("##########################################");
log.info("repo scan init : {} {}", configId(), repoId);
}
@Override
public void onEnd() {
log.info("repo stats : total={} success={}",
reporter.amazonPublishedFileSize.count(),
reporter.amazonPublishedFileCount.count());
log.info("repo scan done : {} {}", configId(), repoId);
log.info("##########################################");
}
@Override
public void onFile(final File file) {
try {
reporter.repoFilePeek.add(file);
reporter.fileRate.mark();
reporter.fileCount.inc();
checkInterruption();
final String path = //
PathHelp.rootFullPath(PathHelp.relativePath(root, file));
if (entry.isExcluded(path)) {
reporter.amazonIgnoredFileCount.inc();
return;
}
reporter.repoFileSize.inc(file.length());