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