Skip to content
Snippets Groups Projects
Commit 265a79c3 authored by Gerhard Gonter's avatar Gerhard Gonter :speech_balloon:
Browse files

progress info when running

parent 3c2444aa
No related branches found
No related tags found
No related merge requests found
......@@ -367,8 +367,8 @@ sub verify_toc
#### my @extra_fields= (exists ($reg->{'toc_extra_fields'})) ? $reg->{'toc_extra_fields'} : ();
my $c= $reg->{'proj_cat'};
# get list of key to sequence mapping
my $fnm_key_seq= $c . '/KEY-SEQ.toc.json';
# get key to sequence mapping
my $fnm_key_seq= $reg->{'proj_cfg_dir'} . '/KEY-SEQ.json';
my $KEY_SEQ;
$KEY_SEQ= TA::Util::slurp_file ($fnm_key_seq, 'json') unless ($reset);
$KEY_SEQ= {} unless (defined $KEY_SEQ);
......@@ -423,7 +423,7 @@ sub verify_toc
{
my $p= $items{$item};
my $j= TA::Util::slurp_file ($p->[0], 'json');
print "[$p->[0]] j: ", main::Dumper ($j);
# print "[$p->[0]] j: ", main::Dumper ($j);
my $key= $j->{'key'};
my $seq= $KEY_SEQ->{$key};
......@@ -440,7 +440,7 @@ sub verify_toc
{
my $store= $jj->{'store'};
print join ('/', $key, $seq, $store), "\n";
# print join ('/', $key, $seq, $store), "\n";
$i_stores{$store}= $jj;
push (@i_stores, $store);
......@@ -454,7 +454,7 @@ sub verify_toc
};
&$check_item($j, $jj, $ster) if (defined ($check_item));
print "ster: ", main::Dumper ($ster);
# print "ster: ", main::Dumper ($ster);
push (@{$stores{$store}}, $ster);
}
}
......@@ -488,7 +488,7 @@ sub verify_toc
foreach my $r (@$ss)
{
print __LINE__, " r: ", main::Dumper ($r);
# print __LINE__, " r: ", main::Dumper ($r);
print TOC join (';', map { $r->{$_} } @hdr1), ';';
if (1 || $r->{'found'})
......
......@@ -116,7 +116,7 @@ elsif ($op_mode eq 'lookup')
{
foreach my $key (@PAR)
{
my $res= $objreg->lookup ($key);
my $res= $objreg->lookup ( { 'md5' => $key } );
print "res: ", Dumper ($res);
}
}
......@@ -180,12 +180,16 @@ sub refresh_internal
my $md5cat= new md5cat ();
$md5cat->read_flist ($DEFAULT_file_list);
# print "md5cat: ", Dumper ($md5cat);
print "flist processed\n";
# compare TOC and reference filelist
my $fl= $md5cat->{'FLIST'};
my %key= ();
my $cnt= 0;
printf ("%6d items to be processed\n", scalar @$toc);
foreach my $x (@$toc)
{
printf ("%6d items processed\n", $cnt) if ((++$cnt % 100) == 0);
# print __LINE__, " k=[$k]\n";
my $k= $x->{'key'};
my $p= $x->{'path'};
......@@ -223,13 +227,16 @@ sub refresh_internal
# print "paths: ", Dumper (\%paths);
# print "fl: ", Dumper ($fl);
print __LINE__, " check_new_files\n";
my $new_files= $md5cat->check_new_files ();
# print "new_files: ", Dumper ($new_files);
print __LINE__, " integrate_md5_sums\n";
$md5cat->integrate_md5_sums ($new_files);
# $md5cat->save_catalog (); # TODO: if save_catalog flag is true!
# ZZZ
# update the Object registry with new items
printf ("%6d new items to be processed\n", scalar @$new_files);
foreach my $nf (@$new_files)
{
my ($md5, $path, $size, $mtime)= @$nf;
......@@ -343,7 +350,7 @@ sub verify_toc_item
my $ster= shift; # TOC item to be updated
# print __LINE__, " verify_toc_item: j=", Dumper ($j);
print __LINE__, " verify_toc_item: jj=", Dumper ($jj);
# print __LINE__, " verify_toc_item: jj=", Dumper ($jj);
# my @paths= keys %{$jj->{'path'}};
# $ster->{'path_count'}= scalar @paths; ... we don't see that this way anymore
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment