Changeset 11109 for branches/eam_branch_00/ippTasks/phase2.pro
- Timestamp:
- Jan 15, 2007, 3:05:56 PM (20 years ago)
- File:
-
- 1 edited
-
branches/eam_branch_00/ippTasks/phase2.pro (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branch_00/ippTasks/phase2.pro
r11059 r11109 1 1 ## this file contains the tasks for running the phase 0 stage 2 ## these tasks use the book Phase2Imfiles2 ## these tasks use the book p2PendingImfile 3 3 4 4 if ($?network == 0) … … 20 20 exec mkdir -p $LOGSUBDIR 21 21 22 book init Phase2Imfiles22 book init p2PendingImfile 23 23 24 24 macro phase2.status 25 book listbook Phase2Imfiles25 book listbook p2PendingImfile 26 26 end 27 27 28 28 # select images ready for phase2 analysis 29 # new entries are added to Phase2Imfiles29 # new entries are added to p2PendingImfile 30 30 # skip already-present entries 31 31 task phase2.imfile.load … … 36 36 periods -timeout 30 37 37 38 stdout $LOGSUBDIR/phase2.imfile.log38 stdout NULL 39 39 stderr $LOGSUBDIR/phase2.imfile.log 40 40 … … 46 46 task.exit 0 47 47 # convert 'stdout' to book format 48 ipptool2book stdout Phase2Imfiles-key exp_tag:class_id -uniq48 ipptool2book stdout p2PendingImfile -key exp_tag:class_id -uniq 49 49 if ($VERBOSE > 2) 50 book listbook Phase2Imfiles50 book listbook p2PendingImfile 51 51 end 52 52 53 53 # delete existing entries which are DONE 54 book delpage Phase2Imfiles-key state DONE54 book delpage p2PendingImfile -key state DONE 55 55 end 56 56 … … 73 73 74 74 task.exec 75 book npages Phase2Imfiles-var N75 book npages p2PendingImfile -var N 76 76 if ($N == 0) break 77 77 if ($network == 0) break 78 78 79 # look for new images in Phase2Imfiles(state == NULL)80 book getpage Phase2Imfiles0 -var pageName -key state NULL79 # look for new images in p2PendingImfile (state == NULL) 80 book getpage p2PendingImfile 0 -var pageName -key state NULL 81 81 if ($pageName == NULL) break 82 82 83 book setword Phase2Imfiles $pageName state RUN 84 book getword Phase2Imfiles $pageName camera -var CAMERA 85 book getword Phase2Imfiles $pageName exp_tag -var EXP_TAG 86 book getword Phase2Imfiles $pageName class_id -var CLASS_ID 87 book getword Phase2Imfiles $pageName uri -var URI 83 book setword p2PendingImfile $pageName state RUN 84 book getword p2PendingImfile $pageName camera -var CAMERA 85 book getword p2PendingImfile $pageName exp_tag -var EXP_TAG 86 book getword p2PendingImfile $pageName outpath -var OUTPATH 87 book getword p2PendingImfile $pageName class_id -var CLASS_ID 88 book getword p2PendingImfile $pageName uri -var URI 88 89 89 90 # specify choice of remote host … … 95 96 end 96 97 97 ## add 'p2' to the log files? 98 # XXX this is still a lame rule 99 # make 'basename' an opihi function? 100 $word = `basename $EXP_TAG | tr '.' ' '` 101 list word -split $word 102 $base = $word:0 103 stdout $LOGSUBDIR/$base/$EXP_TAG.$CLASS_ID.log 104 stderr $LOGSUBDIR/$base/$EXP_TAG.$CLASS_ID.log 105 exec mkdir -p $LOGSUBDIR/$base 98 ## generate output log based on filerule 99 $outroot = $OUTPATH/$EXP_TAG 100 $logfile = `ipp_filename.pl PHASE2.LOG $outroot $CLASS_ID` 101 stdout $logfile 102 stderr $logfile 103 exec mkdir -p $OUTPATH 106 104 107 105 # save the pageName for future reference below … … 112 110 echo command phase2.pl --exp_tag $EXP_TAG --class_id $CLASS_ID --uri $URI --camera $CAMERA 113 111 end 114 command phase2.pl --exp_tag $EXP_TAG --class_id $CLASS_ID --uri $URI --camera $CAMERA 115 end 116 117 # success 118 task.exit 0 119 # phase2.pl updates DB tables, here we just update the page 120 book setword Phase2Imfiles $options:0 state DONE 112 command phase2.pl --exp_tag $EXP_TAG --class_id $CLASS_ID --uri $URI --camera $CAMERA --outpath $OUTPATH 121 113 end 122 114 123 115 # default exit status 124 116 task.exit default 125 showcommand failure 126 book setword Phase2Imfiles $options:0 state FAIL 117 process_exit p2PendingImfile $options:0 $JOB_STATUS 127 118 end 128 119 … … 130 121 task.exit timeout 131 122 showcommand timeout 132 book setword Phase2Imfiles$options:0 state TIMEOUT123 book setword p2PendingImfile $options:0 state TIMEOUT 133 124 end 134 125 end
Note:
See TracChangeset
for help on using the changeset viewer.
