Changeset 25027 for branches/pap/ippTasks/stack.pro
- Timestamp:
- Aug 7, 2009, 4:08:25 PM (17 years ago)
- Location:
- branches/pap
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
ippTasks/stack.pro (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/pap
- Property svn:mergeinfo changed
-
branches/pap/ippTasks/stack.pro
r23230 r25027 10 10 ### Initialise the books containing the tasks to do 11 11 book init stackSumSkyfile 12 book init stackCleanup12 #book init stackCleanup 13 13 14 14 ### Database lists 15 15 $stackSkycell_DB = 0 16 $stackCleanup_DB = 016 #$stackCleanup_DB = 0 17 17 18 18 ### Check status of stacking tasks 19 19 macro stack.status 20 20 book listbook stackSumSkyfile 21 book listbook stackCleanup21 # book listbook stackCleanup 22 22 end 23 23 … … 25 25 macro stack.reset 26 26 book init stackSumSkyfile 27 book init stackCleanup27 # book init stackCleanup 28 28 end 29 29 … … 48 48 end 49 49 50 macro stack.cleanup.on51 task stack.cleanup.load52 active true53 end54 task stack.cleanup.run55 active true56 end57 end58 59 macro stack.cleanup.off60 task stack.cleanup.load61 active false62 end63 task stack.cleanup.run64 active false65 end66 end50 # macro stack.cleanup.on 51 # task stack.cleanup.load 52 # active true 53 # end 54 # task stack.cleanup.run 55 # active true 56 # end 57 # end 58 59 # macro stack.cleanup.off 60 # task stack.cleanup.load 61 # active false 62 # end 63 # task stack.cleanup.run 64 # active false 65 # end 66 # end 67 67 68 68 … … 81 81 82 82 task.exec 83 if ($LABEL:n == 0) break 83 84 $run = stacktool -tosum 84 85 if ($DB:n == 0) … … 92 93 end 93 94 add_poll_args run 95 add_poll_labels run 94 96 command $run 95 97 end … … 143 145 book getword stackSumSkyfile $pageName skycell_id -var SKYCELL_ID 144 146 book getword stackSumSkyfile $pageName workdir -var WORKDIR_TEMPLATE 147 book getword stackSumSkyfile $pageName reduction -var REDUCTION 145 148 book getword stackSumSkyfile $pageName dbname -var DBNAME 146 149 book getword stackSumSkyfile $pageName state -var RUN_STATE … … 161 164 162 165 $run = stack_skycell.pl --threads @MAX_THREADS@ --stack_id $STACK_ID --outroot $outroot --redirect-output --run-state $RUN_STATE 166 if ("$REDUCTION" != "NULL") 167 $run = $run --reduction $REDUCTION 168 end 163 169 add_standard_args run 164 170 … … 193 199 194 200 195 # select images ready for stack analysis 196 # new entries are added to stackCleanup 197 # skip already-present entries 198 task stack.cleanup.load 199 host local 200 201 periods -poll $LOADPOLL 202 periods -exec $LOADEXEC 203 periods -timeout 30 204 npending 1 205 active false 206 207 stdout NULL 208 stderr $LOGDIR/stack.cleanup.log 209 210 task.exec 211 $run = stacktool -pendingcleanuprun 212 if ($DB:n == 0) 213 option DEFAULT 214 else 215 # save the DB name for the exit tasks 216 option $DB:$stackCleanup_DB 217 $run = $run -dbname $DB:$stackCleanup_DB 218 $stackCleanup_DB ++ 219 if ($stackCleanup_DB >= $DB:n) set stackCleanup_DB = 0 220 end 221 add_poll_args run 222 command $run 223 end 224 225 # success 226 task.exit 0 227 # convert 'stdout' to book format 228 ipptool2book stdout stackCleanup -key stack_id -uniq -setword dbname $options:0 -setword pantaskState INIT 229 if ($VERBOSE > 2) 230 book listbook stackCleanup 231 end 232 233 # delete existing entries in the appropriate pantaskStates 234 process_cleanup stackCleanup 235 end 236 237 # locked list 238 task.exit default 239 showcommand failure 240 end 241 242 task.exit crash 243 showcommand crash 244 end 245 246 # operation times out? 247 task.exit timeout 248 showcommand timeout 249 end 250 end 251 252 # run the ipp_cleanup.pl script on pending images 253 task stack.cleanup.run 254 periods -poll $RUNPOLL 255 periods -exec $RUNEXEC 256 periods -timeout 60 257 active false 258 259 task.exec 260 book npages stackCleanup -var N 261 if ($N == 0) break 262 if ($NETWORK == 0) break 201 # # select images ready for stack analysis 202 # # new entries are added to stackCleanup 203 # # skip already-present entries 204 # task stack.cleanup.load 205 # host local 206 207 # periods -poll $LOADPOLL 208 # periods -exec $LOADEXEC 209 # periods -timeout 30 210 # npending 1 211 # active false 212 213 # stdout NULL 214 # stderr $LOGDIR/stack.cleanup.log 215 216 # task.exec 217 # if ($LABEL:n == 0) break 218 # $run = stacktool -pendingcleanuprun 219 # if ($DB:n == 0) 220 # option DEFAULT 221 # else 222 # # save the DB name for the exit tasks 223 # option $DB:$stackCleanup_DB 224 # $run = $run -dbname $DB:$stackCleanup_DB 225 # $stackCleanup_DB ++ 226 # if ($stackCleanup_DB >= $DB:n) set stackCleanup_DB = 0 227 # end 228 # add_poll_args run 229 # add_poll_labels run 230 # command $run 231 # end 232 233 # # success 234 # task.exit 0 235 # # convert 'stdout' to book format 236 # ipptool2book stdout stackCleanup -key stack_id -uniq -setword dbname $options:0 -setword pantaskState INIT 237 # if ($VERBOSE > 2) 238 # book listbook stackCleanup 239 # end 240 241 # # delete existing entries in the appropriate pantaskStates 242 # process_cleanup stackCleanup 243 # end 244 245 # # locked list 246 # task.exit default 247 # showcommand failure 248 # end 249 250 # task.exit crash 251 # showcommand crash 252 # end 253 254 # # operation times out? 255 # task.exit timeout 256 # showcommand timeout 257 # end 258 # end 259 260 # # run the ipp_cleanup.pl script on pending images 261 # task stack.cleanup.run 262 # periods -poll $RUNPOLL 263 # periods -exec $RUNEXEC 264 # periods -timeout 60 265 # active false 266 267 # task.exec 268 # book npages stackCleanup -var N 269 # if ($N == 0) break 270 # if ($NETWORK == 0) break 263 271 264 # look for new images in stackCleanup (pantaskState == INIT)265 book getpage stackCleanup 0 -var pageName -key pantaskState INIT266 if ("$pageName" == "NULL") break267 268 book setword stackCleanup $pageName pantaskState RUN269 book getword stackCleanup $pageName camera -var CAMERA270 book getword stackCleanup $pageName state -var CLEANUP_MODE271 book getword stackCleanup $pageName stack_id -var STACK_ID272 book getword stackCleanup $pageName dbname -var DBNAME273 274 # specify choice of local or remote host based on camera and stack (class_id)275 set.host.for.camera $CAMERA FPA276 277 stdout $LOGDIR/stack.cleanup.log278 stderr $LOGDIR/stack.cleanup.log279 280 # XXX is everything listed here needed?281 $run = ipp_cleanup.pl --stage stack --stage_id $STACK_ID --camera $CAMERA --mode $CLEANUP_MODE282 add_standard_args run283 284 # save the pageName for future reference below285 options $pageName286 287 # create the command line288 if ($VERBOSE > 1)289 echo command $run290 end291 command $run292 end293 294 # default exit status295 task.exit default296 process_exit stackCleanup $options:0 $JOB_STATUS297 end298 299 task.exit crash300 showcommand crash301 book setword stackCleanup $options:0 pantaskState CRASH302 end303 304 # operation timed out?305 task.exit timeout306 showcommand timeout307 book setword stackCleanup $options:0 pantaskState TIMEOUT308 end309 end272 # # look for new images in stackCleanup (pantaskState == INIT) 273 # book getpage stackCleanup 0 -var pageName -key pantaskState INIT 274 # if ("$pageName" == "NULL") break 275 276 # book setword stackCleanup $pageName pantaskState RUN 277 # book getword stackCleanup $pageName camera -var CAMERA 278 # book getword stackCleanup $pageName state -var CLEANUP_MODE 279 # book getword stackCleanup $pageName stack_id -var STACK_ID 280 # book getword stackCleanup $pageName dbname -var DBNAME 281 282 # # specify choice of local or remote host based on camera and stack (class_id) 283 # set.host.for.camera $CAMERA FPA 284 285 # stdout $LOGDIR/stack.cleanup.log 286 # stderr $LOGDIR/stack.cleanup.log 287 288 # # XXX is everything listed here needed? 289 # $run = ipp_cleanup.pl --stage stack --stage_id $STACK_ID --camera $CAMERA --mode $CLEANUP_MODE 290 # add_standard_args run 291 292 # # save the pageName for future reference below 293 # options $pageName 294 295 # # create the command line 296 # if ($VERBOSE > 1) 297 # echo command $run 298 # end 299 # command $run 300 # end 301 302 # # default exit status 303 # task.exit default 304 # process_exit stackCleanup $options:0 $JOB_STATUS 305 # end 306 307 # task.exit crash 308 # showcommand crash 309 # book setword stackCleanup $options:0 pantaskState CRASH 310 # end 311 312 # # operation timed out? 313 # task.exit timeout 314 # showcommand timeout 315 # book setword stackCleanup $options:0 pantaskState TIMEOUT 316 # end 317 # end
Note:
See TracChangeset
for help on using the changeset viewer.
