- Timestamp:
- Jul 30, 2009, 5:20:29 PM (17 years ago)
- Location:
- branches/czw_branch/cleanup
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
ippScripts/scripts/ipp_cleanup.pl (modified) (12 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/czw_branch/cleanup
- Property svn:mergeinfo changed
/trunk (added) merged: 24714-24742,24744-24784,24786-24798,24801-24824,24827-24834,24836-24859,24861-24901,24903-24912,24914-24939
- Property svn:mergeinfo changed
-
branches/czw_branch/cleanup/ippScripts/scripts/ipp_cleanup.pl
r24902 r24951 827 827 addFilename (\@files, "PPIMAGE.OUTPUT.MASK", $path_base, $class_id); 828 828 addFilename (\@files, "PPIMAGE.OUTPUT.VARIANCE", $path_base, $class_id); 829 addFilename (\@files, "PPIMAGE.CHIP", $path_base, $class_id);830 addFilename (\@files, "PPIMAGE.CHIP.MASK", $path_base, $class_id);831 addFilename (\@files, "PPIMAGE.CHIP.VARIANCE", $path_base, $class_id);829 # addFilename (\@files, "PPIMAGE.CHIP", $path_base, $class_id); 830 # addFilename (\@files, "PPIMAGE.CHIP.MASK", $path_base, $class_id); 831 # addFilename (\@files, "PPIMAGE.CHIP.VARIANCE", $path_base, $class_id); 832 832 if ($mode eq "goto_purged") { 833 833 # additional files to remove for 'purge' mode 834 addFilename (\@files, "PPIMAGE.OUTPUT.FPA1", $path_base, $class_id);835 addFilename (\@files, "PPIMAGE.OUTPUT.FPA2", $path_base, $class_id);834 # addFilename (\@files, "PPIMAGE.OUTPUT.FPA1", $path_base, $class_id); 835 # addFilename (\@files, "PPIMAGE.OUTPUT.FPA2", $path_base, $class_id); 836 836 addFilename (\@files, "PPIMAGE.BIN1", $path_base, $class_id); 837 837 addFilename (\@files, "PPIMAGE.BIN2", $path_base, $class_id); … … 839 839 addFilename (\@files, "PPIMAGE.JPEG2", $path_base, $class_id); 840 840 addFilename (\@files, "PPIMAGE.STATS", $path_base, $class_id); 841 addFilename (\@files, "PPIMAGE.CONFIG", $path_base, $class_id);841 # addFilename (\@files, "PPIMAGE.CONFIG", $path_base, $class_id); 842 842 } 843 843 … … 866 866 &my_die("Unable to perform dettool: $error_code", "$stage", $stage_id, $error_code); 867 867 } 868 868 869 } else { 869 870 … … 880 881 } 881 882 } 883 884 # Check to see if we can mark the whole detRunSummary object as cleaned. 885 886 $command = "$dettool -pendingcleanup_detrunsummary -det_id $stage_id"; 887 $command .= " -dbname $dbname" if defined $dbname; 888 ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = run(command => $command, verbose => $verbose); 889 unless ($success) { 890 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); 891 &my_die("Unable to perform dettool: $error_code", "$stage (detRunSummary)", $stage_id, $error_code); 892 } 893 $metadata = $mdcParser->parse(join "", @$stdout_buf) or 894 &my_die("Unable to parse metadata config doc", "$stage (detRunSummary)", $stage_id, $PS_EXIT_PROG_ERROR); 895 $exps = parse_md_list($metadata) or 896 &my_die("Unable to parse metadata list", "$stage (detRunSummary)", $stage_id, $PS_EXIT_PROG_ERROR); 897 898 foreach my $exp (@$exps) { 899 my $iteration = $exp->{iteration}; 900 my $command; 901 if ($mode eq "goto_cleaned") { 902 $command = "$dettool -updatedetrunsummary -det_id $stage_id -iteration $iteration -data_state cleaned"; 903 } 904 if ($mode eq "goto_scrubbed") { 905 $command = "$dettool -updatedetrunsummary -det_id $stage_id -iteration $iteration -data_state scrubbed"; 906 } 907 if ($mode eq "goto_purged") { 908 $command = "$dettool -updatedetrunsummary -det_id $stage_id -iteration $iteration -data_state purged"; 909 } 910 $command .= " -dbname $dbname" if defined $dbname; 911 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 912 run(command => $command, verbose => $verbose); 913 unless ($success) { 914 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); 915 &my_die("Unable to perform dettool: $error_code", "$stage (detRunSummary)", $stage_id, $error_code); 916 } 917 } 918 882 919 exit 0; 883 920 } … … 973 1010 } 974 1011 } 1012 # Check to see if we can mark the whole detRunSummary object as cleaned. 1013 1014 $command = "$dettool -pendingcleanup_detrunsummary -det_id $stage_id"; 1015 $command .= " -dbname $dbname" if defined $dbname; 1016 ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = run(command => $command, verbose => $verbose); 1017 unless ($success) { 1018 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); 1019 &my_die("Unable to perform dettool: $error_code", "$stage (detRunSummary)", $stage_id, $error_code); 1020 } 1021 $metadata = $mdcParser->parse(join "", @$stdout_buf) or 1022 &my_die("Unable to parse metadata config doc", "$stage (detRunSummary)", $stage_id, $PS_EXIT_PROG_ERROR); 1023 $exps = parse_md_list($metadata) or 1024 &my_die("Unable to parse metadata list", "$stage (detRunSummary)", $stage_id, $PS_EXIT_PROG_ERROR); 1025 1026 foreach my $exp (@$exps) { 1027 my $iteration = $exp->{iteration}; 1028 my $command; 1029 if ($mode eq "goto_cleaned") { 1030 $command = "$dettool -updatedetrunsummary -det_id $stage_id -iteration $iteration -data_state cleaned"; 1031 } 1032 if ($mode eq "goto_scrubbed") { 1033 $command = "$dettool -updatedetrunsummary -det_id $stage_id -iteration $iteration -data_state scrubbed"; 1034 } 1035 if ($mode eq "goto_purged") { 1036 $command = "$dettool -updatedetrunsummary -det_id $stage_id -iteration $iteration -data_state purged"; 1037 } 1038 $command .= " -dbname $dbname" if defined $dbname; 1039 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 1040 run(command => $command, verbose => $verbose); 1041 unless ($success) { 1042 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); 1043 &my_die("Unable to perform dettool: $error_code", "$stage (detRunSummary)", $stage_id, $error_code); 1044 } 1045 } 1046 975 1047 exit 0; 976 1048 } … … 1073 1145 } 1074 1146 } 1147 # Check to see if we can mark the whole detRunSummary object as cleaned. 1148 1149 $command = "$dettool -pendingcleanup_detrunsummary -det_id $stage_id"; 1150 $command .= " -dbname $dbname" if defined $dbname; 1151 ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = run(command => $command, verbose => $verbose); 1152 unless ($success) { 1153 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); 1154 &my_die("Unable to perform dettool: $error_code", "$stage (detRunSummary)", $stage_id, $error_code); 1155 } 1156 $metadata = $mdcParser->parse(join "", @$stdout_buf) or 1157 &my_die("Unable to parse metadata config doc", "$stage (detRunSummary)", $stage_id, $PS_EXIT_PROG_ERROR); 1158 $exps = parse_md_list($metadata) or 1159 &my_die("Unable to parse metadata list", "$stage (detRunSummary)", $stage_id, $PS_EXIT_PROG_ERROR); 1160 1161 foreach my $exp (@$exps) { 1162 my $iteration = $exp->{iteration}; 1163 my $command; 1164 if ($mode eq "goto_cleaned") { 1165 $command = "$dettool -updatedetrunsummary -det_id $stage_id -iteration $iteration -data_state cleaned"; 1166 } 1167 if ($mode eq "goto_scrubbed") { 1168 $command = "$dettool -updatedetrunsummary -det_id $stage_id -iteration $iteration -data_state scrubbed"; 1169 } 1170 if ($mode eq "goto_purged") { 1171 $command = "$dettool -updatedetrunsummary -det_id $stage_id -iteration $iteration -data_state purged"; 1172 } 1173 $command .= " -dbname $dbname" if defined $dbname; 1174 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 1175 run(command => $command, verbose => $verbose); 1176 unless ($success) { 1177 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); 1178 &my_die("Unable to perform dettool: $error_code", "$stage (detRunSummary)", $stage_id, $error_code); 1179 } 1180 } 1181 1075 1182 exit 0; 1076 1183 } … … 1132 1239 } 1133 1240 } 1241 # Check to see if we can mark the whole detRunSummary object as cleaned. 1242 1243 $command = "$dettool -pendingcleanup_detrunsummary -det_id $stage_id"; 1244 $command .= " -dbname $dbname" if defined $dbname; 1245 ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = run(command => $command, verbose => $verbose); 1246 unless ($success) { 1247 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); 1248 &my_die("Unable to perform dettool: $error_code", "$stage (detRunSummary)", $stage_id, $error_code); 1249 } 1250 $metadata = $mdcParser->parse(join "", @$stdout_buf) or 1251 &my_die("Unable to parse metadata config doc", "$stage (detRunSummary)", $stage_id, $PS_EXIT_PROG_ERROR); 1252 $exps = parse_md_list($metadata) or 1253 &my_die("Unable to parse metadata list", "$stage (detRunSummary)", $stage_id, $PS_EXIT_PROG_ERROR); 1254 1255 foreach my $exp (@$exps) { 1256 my $iteration = $exp->{iteration}; 1257 my $command; 1258 if ($mode eq "goto_cleaned") { 1259 $command = "$dettool -updatedetrunsummary -det_id $stage_id -iteration $iteration -data_state cleaned"; 1260 } 1261 if ($mode eq "goto_scrubbed") { 1262 $command = "$dettool -updatedetrunsummary -det_id $stage_id -iteration $iteration -data_state scrubbed"; 1263 } 1264 if ($mode eq "goto_purged") { 1265 $command = "$dettool -updatedetrunsummary -det_id $stage_id -iteration $iteration -data_state purged"; 1266 } 1267 $command .= " -dbname $dbname" if defined $dbname; 1268 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 1269 run(command => $command, verbose => $verbose); 1270 unless ($success) { 1271 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); 1272 &my_die("Unable to perform dettool: $error_code", "$stage (detRunSummary)", $stage_id, $error_code); 1273 } 1274 } 1275 1134 1276 exit 0; 1135 1277 … … 1226 1368 } 1227 1369 } 1370 # Check to see if we can mark the whole detRunSummary object as cleaned. 1371 1372 $command = "$dettool -pendingcleanup_detrunsummary -det_id $stage_id"; 1373 $command .= " -dbname $dbname" if defined $dbname; 1374 ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = run(command => $command, verbose => $verbose); 1375 unless ($success) { 1376 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); 1377 &my_die("Unable to perform dettool: $error_code", "$stage (detRunSummary)", $stage_id, $error_code); 1378 } 1379 $metadata = $mdcParser->parse(join "", @$stdout_buf) or 1380 &my_die("Unable to parse metadata config doc", "$stage (detRunSummary)", $stage_id, $PS_EXIT_PROG_ERROR); 1381 $exps = parse_md_list($metadata) or 1382 &my_die("Unable to parse metadata list", "$stage (detRunSummary)", $stage_id, $PS_EXIT_PROG_ERROR); 1383 1384 foreach my $exp (@$exps) { 1385 my $iteration = $exp->{iteration}; 1386 my $command; 1387 if ($mode eq "goto_cleaned") { 1388 $command = "$dettool -updatedetrunsummary -det_id $stage_id -iteration $iteration -data_state cleaned"; 1389 } 1390 if ($mode eq "goto_scrubbed") { 1391 $command = "$dettool -updatedetrunsummary -det_id $stage_id -iteration $iteration -data_state scrubbed"; 1392 } 1393 if ($mode eq "goto_purged") { 1394 $command = "$dettool -updatedetrunsummary -det_id $stage_id -iteration $iteration -data_state purged"; 1395 } 1396 $command .= " -dbname $dbname" if defined $dbname; 1397 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 1398 run(command => $command, verbose => $verbose); 1399 unless ($success) { 1400 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); 1401 &my_die("Unable to perform dettool: $error_code", "$stage (detRunSummary)", $stage_id, $error_code); 1402 } 1403 } 1404 1228 1405 exit 0; 1229 1406 } … … 1306 1483 # delete the temporary image datafiles 1307 1484 addFilename (\@files, "PPIMAGE.OUTPUT", $path_base, $class_id); 1308 addFilename (\@files, "PPIMAGE.CHIP", $path_base, $class_id);1309 addFilename (\@files, "PPIMAGE.CHIP.MASK", $path_base, $class_id);1310 addFilename (\@files, "PPIMAGE.CHIP.VARIANCE", $path_base, $class_id);1485 # addFilename (\@files, "PPIMAGE.CHIP", $path_base, $class_id); 1486 # addFilename (\@files, "PPIMAGE.CHIP.MASK", $path_base, $class_id); 1487 # addFilename (\@files, "PPIMAGE.CHIP.VARIANCE", $path_base, $class_id); 1311 1488 if ($mode eq "goto_purged") { 1312 1489 # additional files to remove for 'purge' mode 1313 addFilename (\@files, "PPIMAGE.OUTPUT.FPA1", $path_base, $class_id);1314 addFilename (\@files, "PPIMAGE.OUTPUT.FPA2", $path_base, $class_id);1490 # addFilename (\@files, "PPIMAGE.OUTPUT.FPA1", $path_base, $class_id); 1491 # addFilename (\@files, "PPIMAGE.OUTPUT.FPA2", $path_base, $class_id); 1315 1492 addFilename (\@files, "PPIMAGE.BIN1", $path_base, $class_id); 1316 1493 addFilename (\@files, "PPIMAGE.BIN2", $path_base, $class_id); … … 1318 1495 addFilename (\@files, "PPIMAGE.JPEG2", $path_base, $class_id); 1319 1496 addFilename (\@files, "PPIMAGE.STATS", $path_base, $class_id); 1320 addFilename (\@files, "PPIMAGE.CONFIG", $path_base, $class_id);1497 # addFilename (\@files, "PPIMAGE.CONFIG", $path_base, $class_id); 1321 1498 } 1322 1499 … … 1357 1534 } 1358 1535 } 1536 # Check to see if we can mark the whole detRunSummary object as cleaned. 1537 1538 $command = "$dettool -pendingcleanup_detrunsummary -det_id $stage_id"; 1539 $command .= " -dbname $dbname" if defined $dbname; 1540 ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = run(command => $command, verbose => $verbose); 1541 unless ($success) { 1542 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); 1543 &my_die("Unable to perform dettool: $error_code", "$stage (detRunSummary)", $stage_id, $error_code); 1544 } 1545 $metadata = $mdcParser->parse(join "", @$stdout_buf) or 1546 &my_die("Unable to parse metadata config doc", "$stage (detRunSummary)", $stage_id, $PS_EXIT_PROG_ERROR); 1547 $exps = parse_md_list($metadata) or 1548 &my_die("Unable to parse metadata list", "$stage (detRunSummary)", $stage_id, $PS_EXIT_PROG_ERROR); 1549 1550 foreach my $exp (@$exps) { 1551 my $iteration = $exp->{iteration}; 1552 my $command; 1553 if ($mode eq "goto_cleaned") { 1554 $command = "$dettool -updatedetrunsummary -det_id $stage_id -iteration $iteration -data_state cleaned"; 1555 } 1556 if ($mode eq "goto_scrubbed") { 1557 $command = "$dettool -updatedetrunsummary -det_id $stage_id -iteration $iteration -data_state scrubbed"; 1558 } 1559 if ($mode eq "goto_purged") { 1560 $command = "$dettool -updatedetrunsummary -det_id $stage_id -iteration $iteration -data_state purged"; 1561 } 1562 $command .= " -dbname $dbname" if defined $dbname; 1563 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 1564 run(command => $command, verbose => $verbose); 1565 unless ($success) { 1566 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); 1567 &my_die("Unable to perform dettool: $error_code", "$stage (detRunSummary)", $stage_id, $error_code); 1568 } 1569 } 1570 1359 1571 exit 0; 1360 1572 } … … 1449 1661 } 1450 1662 } 1663 # Check to see if we can mark the whole detRunSummary object as cleaned. 1664 1665 $command = "$dettool -pendingcleanup_detrunsummary -det_id $stage_id"; 1666 $command .= " -dbname $dbname" if defined $dbname; 1667 ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = run(command => $command, verbose => $verbose); 1668 unless ($success) { 1669 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); 1670 &my_die("Unable to perform dettool: $error_code", "$stage (detRunSummary)", $stage_id, $error_code); 1671 } 1672 $metadata = $mdcParser->parse(join "", @$stdout_buf) or 1673 &my_die("Unable to parse metadata config doc", "$stage (detRunSummary)", $stage_id, $PS_EXIT_PROG_ERROR); 1674 $exps = parse_md_list($metadata) or 1675 &my_die("Unable to parse metadata list", "$stage (detRunSummary)", $stage_id, $PS_EXIT_PROG_ERROR); 1676 1677 foreach my $exp (@$exps) { 1678 my $iteration = $exp->{iteration}; 1679 my $command; 1680 if ($mode eq "goto_cleaned") { 1681 $command = "$dettool -updatedetrunsummary -det_id $stage_id -iteration $iteration -data_state cleaned"; 1682 } 1683 if ($mode eq "goto_scrubbed") { 1684 $command = "$dettool -updatedetrunsummary -det_id $stage_id -iteration $iteration -data_state scrubbed"; 1685 } 1686 if ($mode eq "goto_purged") { 1687 $command = "$dettool -updatedetrunsummary -det_id $stage_id -iteration $iteration -data_state purged"; 1688 } 1689 $command .= " -dbname $dbname" if defined $dbname; 1690 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 1691 run(command => $command, verbose => $verbose); 1692 unless ($success) { 1693 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); 1694 &my_die("Unable to perform dettool: $error_code", "$stage (detRunSummary)", $stage_id, $error_code); 1695 } 1696 } 1697 1451 1698 exit 0; 1452 1699 }
Note:
See TracChangeset
for help on using the changeset viewer.
