Changeset 19089 for trunk/ippTasks/stack.pro
- Timestamp:
- Aug 16, 2008, 1:06:59 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/ippTasks/stack.pro (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTasks/stack.pro
r18488 r19089 8 8 check.globals 9 9 10 $LOGSUBDIR = $LOGDIR/stack11 exec mkdir -p $LOGSUBDIR12 13 10 ### Initialise the books containing the tasks to do 14 11 book init stackSumSkyfile 12 book init stackCleanup 15 13 16 14 ### Database lists 17 15 $stackSkycell_DB = 0 16 $stackCleanup_DB = 0 18 17 19 18 ### Check status of stacking tasks 20 19 macro stack.status 21 20 book listbook stackSumSkyfile 21 book listbook stackCleanup 22 22 end 23 23 … … 25 25 macro stack.reset 26 26 book init stackSumSkyfile 27 book init stackCleanup 27 28 end 28 29 … … 35 36 active true 36 37 end 38 task stack.cleanup.load 39 active true 40 end 41 task stack.cleanup.run 42 active true 43 end 37 44 end 38 45 … … 43 50 end 44 51 task stack.skycell.run 52 active false 53 end 54 task stack.cleanup.load 55 active false 56 end 57 task stack.cleanup.run 45 58 active false 46 59 end … … 59 72 60 73 stdout NULL 61 stderr $LOG SUBDIR/stack.skycell.log74 stderr $LOGDIR/stack.skycell.log 62 75 63 76 task.exec … … 168 181 end 169 182 183 184 # select images ready for stack analysis 185 # new entries are added to stackCleanup 186 # skip already-present entries 187 task stack.cleanup.load 188 host local 189 190 periods -poll $LOADPOLL 191 periods -exec $LOADEXEC 192 periods -timeout 30 193 npending 1 194 active true 195 196 stdout NULL 197 stderr $LOGDIR/stack.cleanup.log 198 199 task.exec 200 if ($DB:n == 0) 201 option DEFAULT 202 command stacktool -pendingcleanuprun -limit 20 203 else 204 # save the DB name for the exit tasks 205 option $DB:$stackCleanup_DB 206 command stacktool -pendingcleanuprun -limit 20 -dbname $DB:$stackCleanup_DB 207 $stackCleanup_DB ++ 208 if ($stackCleanup_DB >= $DB:n) set stackCleanup_DB = 0 209 end 210 end 211 212 # success 213 task.exit 0 214 # convert 'stdout' to book format 215 ipptool2book stdout stackCleanup -key stack_id -uniq -setword dbname $options:0 -setword pantaskState INIT 216 if ($VERBOSE > 2) 217 book listbook stackCleanup 218 end 219 220 # delete existing entries in the appropriate pantaskStates 221 process_cleanup stackCleanup 222 end 223 224 # locked list 225 task.exit default 226 showcommand failure 227 end 228 229 # operation times out? 230 task.exit timeout 231 showcommand timeout 232 end 233 end 234 235 # run the ipp_cleanup.pl script on pending images 236 task stack.cleanup.run 237 periods -poll $RUNPOLL 238 periods -exec $RUNEXEC 239 periods -timeout 60 240 active true 241 242 task.exec 243 book npages stackCleanup -var N 244 if ($N == 0) break 245 if ($NETWORK == 0) break 246 247 # look for new images in stackCleanup (pantaskState == INIT) 248 book getpage stackCleanup 0 -var pageName -key pantaskState INIT 249 if ("$pageName" == "NULL") break 250 251 book setword stackCleanup $pageName pantaskState RUN 252 book getword stackCleanup $pageName camera -var CAMERA 253 book getword stackCleanup $pageName state -var CLEANUP_MODE 254 book getword stackCleanup $pageName stack_id -var STACK_ID 255 book getword stackCleanup $pageName dbname -var DBNAME 256 257 # specify choice of local or remote host based on camera and stack (class_id) 258 set.host.for.camera $CAMERA FPA 259 260 stdout $LOGDIR/stack.cleanup.log 261 stderr $LOGDIR/stack.cleanup.log 262 263 # XXX is everything listed here needed? 264 $run = ipp_cleanup.pl --stage stack --stage_id $STACK_ID --camera $CAMERA --mode $CLEANUP_MODE 265 add_standard_args run 266 267 # save the pageName for future reference below 268 options $pageName 269 270 # create the command line 271 if ($VERBOSE > 1) 272 echo command $run 273 end 274 command $run 275 end 276 277 # default exit status 278 task.exit default 279 process_exit stackCleanup $options:0 $JOB_STATUS 280 end 281 282 # operation timed out? 283 task.exit timeout 284 showcommand timeout 285 book setword stackCleanup $options:0 pantaskState TIMEOUT 286 end 287 end
Note:
See TracChangeset
for help on using the changeset viewer.
