[Bio] / Sprout / SproutLoad.pm Repository:
ViewVC logotype

Diff of /Sprout/SproutLoad.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.47, Fri Jun 30 18:31:34 2006 UTC revision 1.48, Fri Jul 7 00:24:16 2006 UTC
# Line 1536  Line 1536 
1536      my $retVal = Stats->new();      my $retVal = Stats->new();
1537      # Get the loader list.      # Get the loader list.
1538      my $loadList = $self->{loaders};      my $loadList = $self->{loaders};
1539        # Create a hash to hold the statistics objects, keyed on relation name.
1540        my %loaderHash = ();
1541      # Loop through the list, finishing the loads. Note that if the finish fails, we die      # Loop through the list, finishing the loads. Note that if the finish fails, we die
1542      # ignominiously. At some future point, we want to make the loads restartable.      # ignominiously. At some future point, we want to make the loads more restartable.
1543      while (my $loader = pop @{$loadList}) {      while (my $loader = pop @{$loadList}) {
1544          # Get the relation name.          # Get the relation name.
1545          my $relName = $loader->RelName;          my $relName = $loader->RelName;
# Line 1548  Line 1550 
1550              # Here we really need to finish.              # Here we really need to finish.
1551              Trace("Finishing $relName.") if T(2);              Trace("Finishing $relName.") if T(2);
1552              my $stats = $loader->Finish();              my $stats = $loader->Finish();
1553                $loaderHash{$relName} = $stats;
1554            }
1555        }
1556        # Now we loop through again, actually loading the tables. We want to finish before
1557        # loading so that if something goes wrong at this point, all the load files are usable
1558        # and we don't have to redo all that work.
1559        for my $relName (sort keys %loaderHash) {
1560            # Get the statistics for this relation.
1561            my $stats = $loaderHash{$relName};
1562            # Check for a database load.
1563              if ($self->{options}->{dbLoad}) {              if ($self->{options}->{dbLoad}) {
1564                  # Here we want to use the load file just created to load the database.                  # Here we want to use the load file just created to load the database.
1565                  Trace("Loading relation $relName.") if T(2);                  Trace("Loading relation $relName.") if T(2);

Legend:
Removed from v.1.47  
changed lines
  Added in v.1.48

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3