Changeset 24595 for trunk/ippTasks/fake.pro
- Timestamp:
- Jun 25, 2009, 4:22:33 PM (17 years ago)
- File:
-
- 1 edited
-
trunk/ippTasks/fake.pro (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTasks/fake.pro
r24098 r24595 7 7 8 8 book init fakePendingImfile 9 book init fakePendingCleanup9 #book init fakePendingCleanup 10 10 11 11 macro fake.status 12 12 book listbook fakePendingImfile 13 book listbook fakePendingCleanup13 # book listbook fakePendingCleanup 14 14 end 15 15 16 16 macro fake.reset 17 17 book init fakePendingImfile 18 book init fakePendingCleanup18 # book init fakePendingCleanup 19 19 end 20 20 … … 43 43 end 44 44 45 macro fake.cleanup.on46 task fake.cleanup.load47 active true48 end49 task fake.cleanup.run50 active true51 end52 end53 54 macro fake.cleanup.off55 task fake.cleanup.load56 active false57 end58 task fake.cleanup.run59 active false60 end61 end45 # macro fake.cleanup.on 46 # task fake.cleanup.load 47 # active true 48 # end 49 # task fake.cleanup.run 50 # active true 51 # end 52 # end 53 54 # macro fake.cleanup.off 55 # task fake.cleanup.load 56 # active false 57 # end 58 # task fake.cleanup.run 59 # active false 60 # end 61 # end 62 62 63 63 # this variable will cycle through the known database names … … 249 249 end 250 250 251 # this variable will cycle through the known database names252 $fake_cleanup_DB = 0253 254 # select images ready for fake analysis255 # new entries are added to fakePendingImfile256 # skip already-present entries257 task fake.cleanup.load258 host local259 260 periods -poll $LOADPOLL261 periods -exec $LOADEXEC262 periods -timeout 30263 npending 1264 active false265 266 stdout NULL267 stderr $LOGDIR/fake.cleanup.log268 269 task.exec270 if ($LABEL:n == 0) break271 $run = faketool -pendingcleanuprun272 if ($DB:n == 0)273 option DEFAULT274 command275 else276 # save the DB name for the exit tasks277 option $DB:$fake_cleanup_DB278 $run = $run -dbname $DB:$fake_cleanup_DB279 $fake_cleanup_DB ++280 if ($fake_cleanup_DB >= $DB:n) set fake_cleanup_DB = 0281 end282 add_poll_args run283 add_poll_labels run284 command $run285 end286 287 # success288 task.exit 0289 # convert 'stdout' to book format290 ipptool2book stdout fakePendingCleanup -key fake_id -uniq -setword dbname $options:0 -setword pantaskState INIT291 if ($VERBOSE > 2)292 book listbook fakePendingCleanup293 end294 295 # delete existing entries in the appropriate pantaskStates296 process_cleanup fakePendingCleanup297 end298 299 # locked list300 task.exit default301 showcommand failure302 end303 304 task.exit crash305 showcommand crash306 end307 308 # operation times out?309 task.exit timeout310 showcommand timeout311 end312 end313 314 # run the ipp_cleanup.pl script on pending images315 task fake.cleanup.run316 periods -poll $RUNPOLL317 periods -exec $RUNEXEC318 periods -timeout 60319 active false320 321 task.exec322 book npages fakePendingCleanup -var N323 if ($N == 0) break324 if ($NETWORK == 0) break251 # # this variable will cycle through the known database names 252 # $fake_cleanup_DB = 0 253 254 # # select images ready for fake analysis 255 # # new entries are added to fakePendingImfile 256 # # skip already-present entries 257 # task fake.cleanup.load 258 # host local 259 260 # periods -poll $LOADPOLL 261 # periods -exec $LOADEXEC 262 # periods -timeout 30 263 # npending 1 264 # active false 265 266 # stdout NULL 267 # stderr $LOGDIR/fake.cleanup.log 268 269 # task.exec 270 # if ($LABEL:n == 0) break 271 # $run = faketool -pendingcleanuprun 272 # if ($DB:n == 0) 273 # option DEFAULT 274 # command 275 # else 276 # # save the DB name for the exit tasks 277 # option $DB:$fake_cleanup_DB 278 # $run = $run -dbname $DB:$fake_cleanup_DB 279 # $fake_cleanup_DB ++ 280 # if ($fake_cleanup_DB >= $DB:n) set fake_cleanup_DB = 0 281 # end 282 # add_poll_args run 283 # add_poll_labels run 284 # command $run 285 # end 286 287 # # success 288 # task.exit 0 289 # # convert 'stdout' to book format 290 # ipptool2book stdout fakePendingCleanup -key fake_id -uniq -setword dbname $options:0 -setword pantaskState INIT 291 # if ($VERBOSE > 2) 292 # book listbook fakePendingCleanup 293 # end 294 295 # # delete existing entries in the appropriate pantaskStates 296 # process_cleanup fakePendingCleanup 297 # end 298 299 # # locked list 300 # task.exit default 301 # showcommand failure 302 # end 303 304 # task.exit crash 305 # showcommand crash 306 # end 307 308 # # operation times out? 309 # task.exit timeout 310 # showcommand timeout 311 # end 312 # end 313 314 # # run the ipp_cleanup.pl script on pending images 315 # task fake.cleanup.run 316 # periods -poll $RUNPOLL 317 # periods -exec $RUNEXEC 318 # periods -timeout 60 319 # active false 320 321 # task.exec 322 # book npages fakePendingCleanup -var N 323 # if ($N == 0) break 324 # if ($NETWORK == 0) break 325 325 326 # look for new images in fakePendingCleanup (pantaskState == INIT)327 book getpage fakePendingCleanup 0 -var pageName -key pantaskState INIT328 if ("$pageName" == "NULL") break329 330 book setword fakePendingCleanup $pageName pantaskState RUN331 book getword fakePendingCleanup $pageName camera -var CAMERA332 book getword fakePendingCleanup $pageName state -var CLEANUP_MODE333 book getword fakePendingCleanup $pageName fake_id -var FAKE_ID334 book getword fakePendingCleanup $pageName dbname -var DBNAME335 336 # specify choice of local or remote host based on camera and fake (class_id)337 set.host.for.camera $CAMERA FPA338 339 stdout $LOGDIR/fake.cleanup.log340 stderr $LOGDIR/fake.cleanup.log341 342 # XXX is everything listed here needed?343 $run = ipp_cleanup.pl --stage fake --stage_id $FAKE_ID --camera $CAMERA --mode $CLEANUP_MODE344 add_standard_args run345 346 # save the pageName for future reference below347 options $pageName348 349 # create the command line350 if ($VERBOSE > 1)351 echo command $run352 end353 command $run354 end355 356 # default exit status357 task.exit default358 process_exit fakePendingCleanup $options:0 $JOB_STATUS359 end360 361 task.exit crash362 showcommand crash363 book setword fakePendingCleanup $options:0 pantaskState CRASH364 end365 366 # operation timed out?367 task.exit timeout368 showcommand timeout369 book setword fakePendingCleanup $options:0 pantaskState TIMEOUT370 end371 end326 # # look for new images in fakePendingCleanup (pantaskState == INIT) 327 # book getpage fakePendingCleanup 0 -var pageName -key pantaskState INIT 328 # if ("$pageName" == "NULL") break 329 330 # book setword fakePendingCleanup $pageName pantaskState RUN 331 # book getword fakePendingCleanup $pageName camera -var CAMERA 332 # book getword fakePendingCleanup $pageName state -var CLEANUP_MODE 333 # book getword fakePendingCleanup $pageName fake_id -var FAKE_ID 334 # book getword fakePendingCleanup $pageName dbname -var DBNAME 335 336 # # specify choice of local or remote host based on camera and fake (class_id) 337 # set.host.for.camera $CAMERA FPA 338 339 # stdout $LOGDIR/fake.cleanup.log 340 # stderr $LOGDIR/fake.cleanup.log 341 342 # # XXX is everything listed here needed? 343 # $run = ipp_cleanup.pl --stage fake --stage_id $FAKE_ID --camera $CAMERA --mode $CLEANUP_MODE 344 # add_standard_args run 345 346 # # save the pageName for future reference below 347 # options $pageName 348 349 # # create the command line 350 # if ($VERBOSE > 1) 351 # echo command $run 352 # end 353 # command $run 354 # end 355 356 # # default exit status 357 # task.exit default 358 # process_exit fakePendingCleanup $options:0 $JOB_STATUS 359 # end 360 361 # task.exit crash 362 # showcommand crash 363 # book setword fakePendingCleanup $options:0 pantaskState CRASH 364 # end 365 366 # # operation timed out? 367 # task.exit timeout 368 # showcommand timeout 369 # book setword fakePendingCleanup $options:0 pantaskState TIMEOUT 370 # end 371 # end
Note:
See TracChangeset
for help on using the changeset viewer.
