Skip to content

Commit

Permalink
Fix to NAS-2505
Browse files Browse the repository at this point in the history
  • Loading branch information
csrster committed Oct 18, 2016
1 parent d27e407 commit ae6ca25
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
import dk.netarkivet.harvester.datamodel.HarvestChannel;
import dk.netarkivet.harvester.datamodel.HarvestChannelDAO;
import dk.netarkivet.harvester.datamodel.HarvestDefinition;
import dk.netarkivet.harvester.datamodel.HarvestDefinitionDAO;
import dk.netarkivet.harvester.datamodel.HeritrixTemplate;
import dk.netarkivet.harvester.datamodel.Job;
import dk.netarkivet.harvester.datamodel.PartialHarvest;
Expand Down Expand Up @@ -74,7 +75,10 @@ public int generateJobs(HarvestDefinition harvest) {
log.info("Generating jobs for harvestdefinition #{}", harvest.getOid());
int jobsMade = 0;
final Iterator<DomainConfiguration> domainConfigurations = harvest.getDomainConfigurations();

harvest.setNumEvents(harvest.getNumEvents() + 1);
if (harvest.isSnapShot()) {
HarvestDefinitionDAO.getInstance().update(harvest);
}
while (domainConfigurations.hasNext()) {
List<DomainConfiguration> subset = new ArrayList<DomainConfiguration>();
while (domainConfigurations.hasNext() && subset.size() < DOMAIN_CONFIG_SUBSET_SIZE) {
Expand All @@ -89,7 +93,6 @@ public int generateJobs(HarvestDefinition harvest) {
harvest.getOid());
jobsMade += processDomainConfigurationSubset(harvest, subset.iterator());
}
harvest.setNumEvents(harvest.getNumEvents() + 1);

if (!harvest.isSnapShot()) {
PartialHarvest focused = (PartialHarvest) harvest;
Expand Down

1 comment on commit ae6ca25

@svcarlsen
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Numevents is written to a field (harvest_num) in the Jobs table, so they can be identified as part of a specific instance of a harvestdefinition

Please sign in to comment.