Changeset 11085
- Timestamp:
- Jan 12, 2007, 4:28:00 PM (19 years ago)
- Location:
- branches/eam_branch_00/ippTasks
- Files:
-
- 2 edited
-
pantasks.pro (modified) (1 diff)
-
phase0.pro (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branch_00/ippTasks/pantasks.pro
r11059 r11085 100 100 end 101 101 end 102 103 macro process_exit 104 if ($0 != 4) 105 echo "USAGE: process_exit (bookName) (pageName) (exitCode)" 106 break 107 end 108 109 $bookName = $1 110 $pageName = $2 111 $exitCode = $3 112 113 # success 114 if ($exitCode == $EXIT_SUCCESS) 115 # the handler scripts update DB the tables; here we just update the page 116 book setword $bookName $pageName state DONE 117 return 118 end 119 120 # failure related to the data files 121 # jobs which result in DATAERR must have db state updated 122 if ($exitCode == $EXIT_DATA_ERR) 123 showcommand failure 124 book setword $bookName $pageName state DATA_ERR 125 return 126 end 127 128 # failure related to the data files 129 if ($exitCode == $EXIT_SYS_ERR) 130 halt 131 showcommand "system failure" 132 book setword $bookName $pageName state SYS_ERR 133 return 134 end 135 136 # failure related to the data files 137 if ($exitCode == $EXIT_CONFIG_ERR) 138 halt 139 showcommand "config error" 140 book setword $bookName $pageName state CONFIG_ERR 141 return 142 end 143 144 # failure related to the data files 145 if ($exitCode == $EXIT_PROG_ERR) 146 halt 147 showcommand "programming error" 148 book setword $bookName $pageName state PROG_ERR 149 return 150 end 151 152 # any other exit status 153 showcommand failure 154 book setword $bookName $pageName state UNKNOWN_ERR 155 end -
branches/eam_branch_00/ippTasks/phase0.pro
r11059 r11085 1 1 ## this file contains the tasks for running the phase 0 stage 2 ## these tasks use the books Phase0Imfiles and Phase0Exposures2 ## these tasks use the books p0PendingImfile and p0PendingExp 3 3 4 4 if ($?network == 0) … … 20 20 exec mkdir -p $LOGSUBDIR 21 21 22 book init Phase0Imfiles23 book init Phase0Exposures22 book init p0PendingImfile 23 book init p0PendingExp 24 24 25 25 macro phase0.status 26 book listbook Phase0Imfiles27 book listbook Phase0Exposures26 book listbook p0PendingImfile 27 book listbook p0PendingExp 28 28 end 29 29 30 30 # select images ready for phase0 analysis 31 # new entries are added to Phase0Imfiles31 # new entries are added to p0PendingImfile 32 32 # compare the new list with the ones already selected 33 33 task phase0.imfile.load … … 49 49 task.exit $EXIT_SUCCESS 50 50 # convert 'stdout' to book format 51 ipptool2book stdout Phase0Imfiles-key exp_tag -uniq51 ipptool2book stdout p0PendingImfile -key exp_tag -uniq 52 52 if ($VERBOSE > 2) 53 book listbook Phase0Imfiles54 end 55 56 # delete existing entries which are DONE 57 book delpage Phase0Imfiles-key state DONE58 echo "p0tool -pendingimfile dtime: $JOB_DTIME"53 book listbook p0PendingImfile 54 end 55 56 # delete existing entries which are DONE or DATAERR 57 book delpage p0PendingImfile -key state DONE 58 book delpage p0PendingImfile -key state DATA_ERR 59 59 end 60 60 … … 77 77 78 78 task.exec 79 book npages Phase0Imfiles-var N79 book npages p0PendingImfile -var N 80 80 if ($N == 0) break 81 81 if ($network == 0) break 82 82 83 # look for new images in Phase0Imfiles84 book getpage Phase0Imfiles0 -var pageName -key state NULL83 # look for new images in p0PendingImfile 84 book getpage p0PendingImfile 0 -var pageName -key state NULL 85 85 if ($pageName == NULL) break 86 86 87 book setword Phase0Imfiles$pageName state RUN88 # Phase0Imfiles->pageName->state = RUN89 90 book getword Phase0Imfiles$pageName exp_tag -var EXP_TAG91 # $EXP_TAG = Phase0Imfiles->pageName->exp_tag92 book getword Phase0Imfiles$pageName class -var CLASS93 book getword Phase0Imfiles$pageName class_id -var CLASS_ID94 book getword Phase0Imfiles$pageName uri -var URI87 book setword p0PendingImfile $pageName state RUN 88 # p0PendingImfile->pageName->state = RUN 89 90 book getword p0PendingImfile $pageName exp_tag -var EXP_TAG 91 # $EXP_TAG = p0PendingImfile->pageName->exp_tag 92 book getword p0PendingImfile $pageName class -var CLASS 93 book getword p0PendingImfile $pageName class_id -var CLASS_ID 94 book getword p0PendingImfile $pageName uri -var URI 95 95 96 96 # specify choice of remote host … … 120 120 121 121 # success 122 task.exit 0 123 # phase0_imfile.pl updates DB tables, here we just update the page 124 book setword Phase0Imfiles $options:0 state DONE 125 # equiv to: Phase0Imfiles->pageName->state = DONE 126 end 127 128 # default exit status 129 task.exit default 130 showcommand failure 131 book setword Phase0Imfiles $options:0 state FAIL 132 end 133 134 # operation times out? 135 task.exit timeout 136 showcommand timeout 137 book setword Phase0Imfiles $options:0 state TIMEOUT 122 task.exit default 123 process_exit p0PendingImfile $options:0 $JOB_STATUS 124 end 125 126 # operation timed out? 127 task.exit timeout 128 showcommand timeout 129 book setword p0PendingImfile $options:0 state TIMEOUT 138 130 end 139 131 end … … 157 149 task.exit 0 158 150 # convert 'stdout' to book format 159 ipptool2book stdout Phase0Exposures-key exp_tag -uniq151 ipptool2book stdout p0PendingExp -key exp_tag -uniq 160 152 if ($VERBOSE > 2) 161 book listbook Phase0Exposures153 book listbook p0PendingExp 162 154 end 163 155 164 156 # delete existing entries which are DONE 165 book delpage Phase0Exposures-key state DONE166 echo "p0tool -pendingexp dtime: $JOB_DTIME"157 book delpage p0PendingExp -key state DONE 158 book delpage p0PendingExp -key state DATA_ERR 167 159 end 168 160 … … 185 177 186 178 task.exec 187 book npages Phase0Exposures-var N179 book npages p0PendingExp -var N 188 180 if ($N == 0) break 189 181 if ($network == 0) break 190 182 191 # look for new images in Phase0Exposures(state == NULL)192 book getpage Phase0Exposures0 -var pageName -key state NULL183 # look for new images in p0PendingExp (state == NULL) 184 book getpage p0PendingExp 0 -var pageName -key state NULL 193 185 if ($pageName == NULL) break 194 186 195 book setword Phase0Exposures$pageName state RUN196 book getword Phase0Exposures$pageName exp_tag -var EXP_TAG187 book setword p0PendingExp $pageName state RUN 188 book getword p0PendingExp $pageName exp_tag -var EXP_TAG 197 189 198 190 # specify choice of remote host:(need to choose based on chips) … … 222 214 223 215 # success 224 task.exit 0 225 # phase0exp.pl updates DB tables, here we just update the page 226 book setword Phase0Exposures $options:0 state DONE 227 end 228 229 # default exit status 230 task.exit default 231 showcommand failure 232 book setword Phase0Exposures $options:0 state FAIL 216 task.exit default 217 process_exit p0PendingExp $options:0 $JOB_STATUS 233 218 end 234 219 … … 236 221 task.exit timeout 237 222 showcommand timeout 238 book setword Phase0Exposures$options:0 state TIMEOUT223 book setword p0PendingExp $options:0 state TIMEOUT 239 224 end 240 225 end
Note:
See TracChangeset
for help on using the changeset viewer.
