Changeset 18273
- Timestamp:
- Jun 22, 2008, 9:04:15 AM (18 years ago)
- Files:
-
- 2 edited
-
branches/eam_branch_20080618/ippScripts/scripts/ipp_cleanup.pl (modified) (2 diffs)
-
trunk/ippTasks/chip.pro (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branch_20080618/ippScripts/scripts/ipp_cleanup.pl
r18191 r18273 63 63 # dettool -pendingcleanupimfile -chip_id $stage_id 64 64 65 # Get list of component files 65 # Get list of component imfiles 66 # XXX may need a different my_die for each stage 66 67 my $imfiles; # Array of component files 67 68 my $command = "$dettool -pendingcleanupimfile -chip_id $stage_id"; # Command to run … … 70 71 unless ($success) { 71 72 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); 72 &my_die("Unable to perform camtool: $error_code", $cam_id, $error_code);73 &my_die("Unable to perform camtool: $error_code", "chip", $stage_id, $error_code); 73 74 } 74 75 my $metadata = $mdcParser->parse(join "", @$stdout_buf) or 75 &my_die("Unable to parse metadata config doc", $cam_id, $PS_EXIT_PROG_ERROR);76 &my_die("Unable to parse metadata config doc", "chip", $stage_id, $PS_EXIT_PROG_ERROR); 76 77 77 78 # extract the metadata for the files into a hash list 78 79 $imfiles = parse_md_list($metadata) or 79 &my_die("Unable to parse metadata list", $cam_id, $PS_EXIT_PROG_ERROR);80 &my_die("Unable to parse metadata list", "chip", $cam_id, $PS_EXIT_PROG_ERROR); 80 81 81 82 # loop over all of the imfiles, determine the path_base and class_id for each -
trunk/ippTasks/chip.pro
r18142 r18273 8 8 # test for required global variables 9 9 check.globals 10 11 $LOGSUBDIR = $LOGDIR/chip12 exec mkdir -p $LOGSUBDIR13 10 14 11 book init chipPendingImfile … … 70 67 71 68 stdout NULL 72 stderr $LOG SUBDIR/chip.imfile.log69 stderr $LOGDIR/chip.imfile.log 73 70 74 71 task.exec … … 151 148 sprintf outroot "%s/%s/%s.ch.%s" $WORKDIR $EXP_TAG $EXP_TAG $CHIP_ID 152 149 153 ## generate output log based on filerule (convert the URI to a PATH) 154 $logfile = `ipp_filename.pl --filerule LOG.IMFILE --camera $CAMERA --class_id $CLASS_ID --basename $outroot` 155 if ("$logfile" == "") 156 echo "WARNING: logfile not defined in chip.pro:152" 157 break 158 end 159 160 stdout $logfile 161 stderr $logfile 162 dirname $logfile -var outpath 163 mkdir $outpath 150 stdout $logdir/chip.imfile.log 151 stderr $logdir/chip.imfile.log 164 152 165 153 $run = chip_imfile.pl --exp_id $EXP_ID --chip_id $CHIP_ID --class_id $CLASS_ID --uri $URI --camera $CAMERA --outroot $outroot … … 207 195 208 196 stdout NULL 209 stderr $LOG SUBDIR/chip.cleanup.log197 stderr $LOGDIR/chip.cleanup.log 210 198 211 199 task.exec 212 200 if ($DB:n == 0) 213 201 option DEFAULT 214 command chiptool -pendingcleanup -limit 20202 command chiptool -pendingcleanuprun -limit 20 215 203 else 216 204 # save the DB name for the exit tasks 217 205 option $DB:$chip_cleanup_DB 218 command chiptool -pendingcleanup -limit 20 -dbname $DB:$chip_cleanup_DB206 command chiptool -pendingcleanuprun -limit 20 -dbname $DB:$chip_cleanup_DB 219 207 $chip_cleanup_DB ++ 220 208 if ($chip_cleanup_DB >= $DB:n) set chip_cleanup_DB = 0 … … 263 251 book setword chipPendingCleanup $pageName pantaskState RUN 264 252 book getword chipPendingCleanup $pageName camera -var CAMERA 265 book getword chipPendingCleanup $pageName class_id -var CLASS_ID266 253 book getword chipPendingCleanup $pageName cleanup_mode -var CLEANUP_MODE 267 book getword chipPendingCleanup $pageName path_base -var PATH_BASE254 book getword chipPendingCleanup $pageName chip_id -var CHIP_ID 268 255 book getword chipPendingCleanup $pageName dbname -var DBNAME 269 256 … … 271 258 set.host.for.camera $CAMERA $CLASS_ID 272 259 273 ## generate output log based on filerule (convert the URI to a PATH) 274 $logfile = `ipp_filename.pl --filerule LOG.IMFILE --camera $CAMERA --class_id $CLASS_ID --basename $PATH_BASE` 275 if ("$logfile" == "") 276 echo "WARNING: logfile not defined in chip.pro:152" 277 break 278 end 279 280 stdout $logfile 281 stderr $logfile 282 dirname $logfile -var outpath 283 mkdir $outpath 260 stdout $LOGDIR/chip.cleanup.log 261 stderr $LOGDIR/chip.cleanup.log 284 262 285 263 # XXX is everything listed here needed? 286 $run = ipp_cleanup.pl --stage chip -- camera $CAMERA --class_id $CLASS_ID --mode $CLEANUP_MODE --path_base $PATH_BASE264 $run = ipp_cleanup.pl --stage chip --stage_id $CHIP_ID --camera $CAMERA --mode $CLEANUP_MODE 287 265 add_standard_args run 288 266
Note:
See TracChangeset
for help on using the changeset viewer.
