{
RepositoryContentStatistics lastStats = results.get( 0 );
sinceWhen = lastStats.getWhenGathered().getTime() + lastStats.getDuration();
}
RepositoryScanStatistics stats = repoScanner.scan( arepo, sinceWhen );
getLogger().info( "Finished repository task: " + stats.toDump( arepo ) );
// I hate jpox and modello
RepositoryContentStatistics dbstats = new RepositoryContentStatistics();
dbstats.setDuration( stats.getDuration() );
dbstats.setNewFileCount( stats.getNewFileCount() );
dbstats.setRepositoryId( stats.getRepositoryId() );
dbstats.setTotalFileCount( stats.getTotalFileCount() );
dbstats.setWhenGathered( stats.getWhenGathered() );
dao.getRepositoryContentStatisticsDAO().saveRepositoryContentStatistics( dbstats );
}
catch ( RepositoryException e )
{