Changeset 19090 for trunk/ippTasks/warp.pro
- Timestamp:
- Aug 16, 2008, 1:07:21 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/ippTasks/warp.pro (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTasks/warp.pro
r18916 r19090 12 12 book init warpInputExp 13 13 book init warpPendingSkyCell 14 book init warpPendingCleanup 14 15 15 16 ### Database lists 16 17 $warpExp_DB = 0 17 18 $warpSkycell_DB = 0 19 $warpCleanup_DB = 0 18 20 19 21 ### Check status of warping tasks … … 21 23 book listbook warpInputExp 22 24 book listbook warpPendingSkyCell 25 book listbook warpPendingCleanup 23 26 end 24 27 … … 27 30 book init warpInputExp 28 31 book init warpPendingSkyCell 32 book init warpPendingCleanup 29 33 end 30 34 … … 43 47 active true 44 48 end 49 task warp.cleanup.load 50 active true 51 end 52 task warp.cleanup.run 53 active true 54 end 45 55 end 46 56 … … 57 67 end 58 68 task warp.skycell.run 69 active false 70 end 71 task warp.cleanup.load 72 active false 73 end 74 task warp.cleanup.run 59 75 active false 60 76 end … … 283 299 end 284 300 301 # select images ready for warp analysis 302 # new entries are added to warpPendingImfile 303 # skip already-present entries 304 task warp.cleanup.load 305 host local 306 307 periods -poll $LOADPOLL 308 periods -exec $LOADEXEC 309 periods -timeout 30 310 npending 1 311 active true 312 313 stdout NULL 314 stderr $LOGDIR/warp.cleanup.log 315 316 task.exec 317 if ($DB:n == 0) 318 option DEFAULT 319 command warptool -pendingcleanuprun -limit 20 320 else 321 # save the DB name for the exit tasks 322 option $DB:$warpCleanup_DB 323 command warptool -pendingcleanuprun -limit 20 -dbname $DB:$warpCleanup_DB 324 $warpCleanup_DB ++ 325 if ($warpCleanup_DB >= $DB:n) set warpCleanup_DB = 0 326 end 327 end 328 329 # success 330 task.exit 0 331 # convert 'stdout' to book format 332 ipptool2book stdout warpPendingCleanup -key warp_id -uniq -setword dbname $options:0 -setword pantaskState INIT 333 if ($VERBOSE > 2) 334 book listbook warpPendingCleanup 335 end 336 337 # delete existing entries in the appropriate pantaskStates 338 process_cleanup warpPendingCleanup 339 end 340 341 # locked list 342 task.exit default 343 showcommand failure 344 end 345 346 # operation times out? 347 task.exit timeout 348 showcommand timeout 349 end 350 end 351 352 # run the ipp_cleanup.pl script on pending images 353 task warp.cleanup.run 354 periods -poll $RUNPOLL 355 periods -exec $RUNEXEC 356 periods -timeout 60 357 active true 358 359 task.exec 360 book npages warpPendingCleanup -var N 361 if ($N == 0) break 362 if ($NETWORK == 0) break 363 364 # look for new images in warpPendingCleanup (pantaskState == INIT) 365 book getpage warpPendingCleanup 0 -var pageName -key pantaskState INIT 366 if ("$pageName" == "NULL") break 367 368 book setword warpPendingCleanup $pageName pantaskState RUN 369 book getword warpPendingCleanup $pageName camera -var CAMERA 370 book getword warpPendingCleanup $pageName state -var CLEANUP_MODE 371 book getword warpPendingCleanup $pageName warp_id -var WARP_ID 372 book getword warpPendingCleanup $pageName dbname -var DBNAME 373 374 # specify choice of local or remote host based on camera and warp (class_id) 375 set.host.for.camera $CAMERA FPA 376 377 stdout $LOGDIR/warp.cleanup.log 378 stderr $LOGDIR/warp.cleanup.log 379 380 # XXX is everything listed here needed? 381 $run = ipp_cleanup.pl --stage warp --stage_id $WARP_ID --camera $CAMERA --mode $CLEANUP_MODE 382 add_standard_args run 383 384 # save the pageName for future reference below 385 options $pageName 386 387 # create the command line 388 if ($VERBOSE > 1) 389 echo command $run 390 end 391 command $run 392 end 393 394 # default exit status 395 task.exit default 396 process_exit warpPendingCleanup $options:0 $JOB_STATUS 397 end 398 399 # operation timed out? 400 task.exit timeout 401 showcommand timeout 402 book setword warpPendingCleanup $options:0 pantaskState TIMEOUT 403 end 404 end
Note:
See TracChangeset
for help on using the changeset viewer.
