Changeset 24596 for trunk/ippTasks/chip.pro
- Timestamp:
- Jun 25, 2009, 4:33:53 PM (17 years ago)
- File:
-
- 1 edited
-
trunk/ippTasks/chip.pro (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTasks/chip.pro
r24595 r24596 3 3 ## these tasks use the book chipPendingImfile 4 4 5 ## XXX the cleanup stage probably needs to mimic the chip processing stages, with an exposure and imfile layer6 ## can we define the cleanup stages in a separate file derived from this file?7 8 5 # test for required global variables 9 6 check.globals 10 7 11 8 book init chipPendingImfile 12 #book init chipPendingCleanup13 9 14 10 macro chip.status 15 11 book listbook chipPendingImfile 16 # book listbook chipPendingCleanup17 12 end 18 13 19 14 macro chip.reset 20 15 book init chipPendingImfile 21 # book init chipPendingCleanup22 16 end 23 17 … … 46 40 end 47 41 48 # macro chip.cleanup.on49 # task chip.cleanup.load50 # active true51 # end52 # task chip.cleanup.run53 # active true54 # end55 # end56 57 # macro chip.cleanup.off58 # task chip.cleanup.load59 # active false60 # end61 # task chip.cleanup.run62 # active false63 # end64 # end65 66 42 # this variable will cycle through the known database names 67 43 $chip_DB = 0 44 $chip_revert_DB = 0 68 45 69 46 # select images ready for chip analysis … … 273 250 end 274 251 275 # # this variable will cycle through the known database names 276 # $chip_cleanup_DB = 0 277 278 # # select images ready for chip analysis 279 # # new entries are added to chipPendingImfile 280 # # skip already-present entries 281 # task chip.cleanup.load 282 # host local 283 284 # periods -poll $LOADPOLL 285 # periods -exec $LOADEXEC 286 # periods -timeout 30 287 # npending 1 288 # active false 289 290 # stdout NULL 291 # stderr $LOGDIR/chip.cleanup.log 292 293 # task.exec 294 # if ($LABEL:n == 0) break 295 # $run = chiptool -pendingcleanuprun 296 # if ($DB:n == 0) 297 # option DEFAULT 298 # else 299 # # save the DB name for the exit tasks 300 # option $DB:$chip_cleanup_DB 301 # $run = $run -dbname $DB:$chip_cleanup_DB 302 # $chip_cleanup_DB ++ 303 # if ($chip_cleanup_DB >= $DB:n) set chip_cleanup_DB = 0 304 # end 305 # add_poll_args run 306 # add_poll_labels run 307 # command $run 308 # end 309 310 # # success 311 # task.exit 0 312 # # convert 'stdout' to book format 313 # ipptool2book stdout chipPendingCleanup -key chip_id -uniq -setword dbname $options:0 -setword pantaskState INIT 314 # if ($VERBOSE > 2) 315 # book listbook chipPendingCleanup 316 # end 317 318 # # delete existing entries in the appropriate pantaskStates 319 # process_cleanup chipPendingCleanup 320 # end 321 322 # # locked list 323 # task.exit default 324 # showcommand failure 325 # end 326 327 # task.exit crash 328 # showcommand crash 329 # end 330 331 # # operation times out? 332 # task.exit timeout 333 # showcommand timeout 334 # end 335 # end 336 337 # # run the ipp_cleanup.pl script on pending images 338 # task chip.cleanup.run 339 # periods -poll $RUNPOLL 340 # periods -exec $RUNEXEC 341 # periods -timeout 60 342 # active false 343 344 # task.exec 345 # book npages chipPendingCleanup -var N 346 # if ($N == 0) break 347 # if ($NETWORK == 0) break 348 349 # # look for new images in chipPendingCleanup (pantaskState == INIT) 350 # book getpage chipPendingCleanup 0 -var pageName -key pantaskState INIT 351 # if ("$pageName" == "NULL") break 352 353 # book setword chipPendingCleanup $pageName pantaskState RUN 354 # book getword chipPendingCleanup $pageName camera -var CAMERA 355 # book getword chipPendingCleanup $pageName state -var CLEANUP_MODE 356 # book getword chipPendingCleanup $pageName chip_id -var CHIP_ID 357 # book getword chipPendingCleanup $pageName dbname -var DBNAME 358 359 # # specify choice of local or remote host based on camera and chip (class_id) 360 # set.host.for.camera $CAMERA FPA 361 362 # stdout $LOGDIR/chip.cleanup.log 363 # stderr $LOGDIR/chip.cleanup.log 364 365 # # XXX is everything listed here needed? 366 # $run = ipp_cleanup.pl --stage chip --stage_id $CHIP_ID --camera $CAMERA --mode $CLEANUP_MODE 367 # add_standard_args run 368 369 # # save the pageName for future reference below 370 # options $pageName 371 372 # # create the command line 373 # if ($VERBOSE > 1) 374 # echo command $run 375 # end 376 # command $run 377 # end 378 379 # # default exit status 380 # task.exit default 381 # process_exit chipPendingCleanup $options:0 $JOB_STATUS 382 # end 383 384 # task.exit crash 385 # showcommand crash 386 # book setword chipPendingCleanup $options:0 pantaskState CRASH 387 # end 388 389 # # operation timed out? 390 # task.exit timeout 391 # showcommand timeout 392 # book setword chipPendingCleanup $options:0 pantaskState TIMEOUT 393 # end 394 # end 252 task chip.revert 253 host local 254 255 periods -poll 5.0 256 periods -exec 60.0 257 periods -timeout 120.0 258 npending 1 259 260 stdout NULL 261 stderr $LOGDIR/revert.log 262 263 task.exec 264 if ($LABEL:n == 0) break 265 $run = chiptool -revertprocessedimfile 266 if ($DB:n == 0) 267 option DEFAULT 268 else 269 # save the DB name for the exit tasks 270 option $DB:$chip_revert_DB 271 $run = $run -dbname $DB:$chip_revert_DB 272 $chip_revert_DB ++ 273 if ($chip_revert_DB >= $DB:n) set chip_revert_DB = 0 274 end 275 add_poll_labels run 276 command $run 277 end 278 279 # success 280 task.exit 0 281 end 282 283 # locked list 284 task.exit default 285 showcommand failure 286 end 287 288 task.exit crash 289 showcommand crash 290 end 291 292 # operation times out? 293 task.exit timeout 294 showcommand timeout 295 end 296 end
Note:
See TracChangeset
for help on using the changeset viewer.
