Changeset 25625 for branches/eam_branches/20090715/ippTasks/pstamp.pro
- Timestamp:
- Sep 27, 2009, 11:34:24 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/20090715/ippTasks/pstamp.pro
r25402 r25625 1 2 #$VERBOSE = 3 1 # pstamp.pro : Postage Stamp Server tasks 2 3 check.globals 4 5 $LOGSUBDIR = $LOGDIR/pstamp 6 mkdir $LOGSUBDIR 3 7 4 8 # these variables wil cycle through the known database names … … 8 12 $pstampJob_DB = 0 9 13 $pstampFin_DB = 0 14 $pstampRev_DB = 0 10 15 11 16 # set PS_DBSERVER if postage stamp database host is not the same as the value for DBSERVER in site.config … … 52 57 active true 53 58 end 54 end 59 task pstamp.job.revert 60 active true 61 end 62 end 63 55 64 56 65 macro pstamp.off … … 75 84 end 76 85 task pstamp.job.run 86 active false 87 end 88 task pstamp.job.revert 89 active false 90 end 91 end 92 93 macro pstamp.revert.on 94 task pstamp.job.revert 95 active true 96 end 97 end 98 macro pstamp.revert.off 99 task pstamp.job.revert 77 100 active false 78 101 end … … 88 111 89 112 task.exec 113 stdout $LOGSUBDIR/pstamp.request.find.log 114 stderr $LOGSUBDIR/pstamp.request.find.log 90 115 if ($DB:n == 0) 91 116 option DEFAULT … … 125 150 126 151 task.exec 152 stdout $LOGSUBDIR/pstamp.request.load.log 153 stderr $LOGSUBDIR/pstamp.request.load.log 127 154 $run = pstamptool -pendingreq 128 155 if ($DB:n == 0) … … 168 195 169 196 task.exec 197 stdout $LOGSUBDIR/pstamp.request.run.log 198 stderr $LOGSUBDIR/pstamp.request.run.log 170 199 book npages pstampRequest -var N 171 200 if ($N == 0) break … … 223 252 224 253 task.exec 254 stdout $LOGSUBDIR/pstamp.finish.load.log 255 stderr $LOGSUBDIR/pstamp.finish.load.log 225 256 $run = pstamptool -completedreq 226 257 if ($DB:n == 0) … … 265 296 266 297 task.exec 298 stdout $LOGSUBDIR/request.finish.run.log 299 stderr $LOGSUBDIR/request.finish.run.log 267 300 book npages pstampFinish -var N 268 301 if ($N == 0) break … … 320 353 321 354 task.exec 355 stdout $LOGSUBDIR/pstamp.job.load.log 356 stderr $LOGSUBDIR/pstamp.job.load.log 322 357 $run = pstamptool -pendingjob 323 358 if ($DB:n == 0) … … 346 381 end 347 382 383 task.exit crash 384 showcommand crash 385 end 386 387 task.exit timeout 388 showcommand timeout 389 end 390 348 391 task.exit default 349 392 showcommand failure 350 393 end 351 394 352 task.exit crash353 showcommand crash354 end355 356 task.exit timeout357 showcommand timeout358 end359 395 end 360 396 … … 365 401 366 402 task.exec 403 stdout $LOGSUBDIR/pstamp.job.run.log 404 stderr $LOGSUBDIR/pstamp.job.run.log 367 405 book npages pstampJob -var N 368 406 if ($N == 0) … … 430 468 end 431 469 end 470 471 task pstamp.job.revert 472 host local 473 474 periods -poll $LOADPOLL 475 periods -exec 10 476 periods -timeout 300 477 npending 1 478 479 task.exec 480 stdout $LOGSUBDIR/pstamp.job.revert.log 481 stderr $LOGSUBDIR/pstamp.job.revert.log 482 $run = pstamptool -revertjob -all 483 if ($DB:n == 0) 484 option DEFAULT 485 else 486 $run = $run $PS_DBSERVER -dbname $DB:$pstampRev_DB 487 $pstampRev_DB ++ 488 if ($pstampRev_DB >= $DB:n) set pstampRev_DB = 0 489 end 490 add_poll_args run 491 # add_poll_labels run 492 command $run 493 end 494 495 task.exit $EXIT_SUCCESS 496 # nothing to do 497 end 498 499 task.exit default 500 showcommand failure 501 end 502 503 task.exit crash 504 showcommand crash 505 end 506 507 task.exit timeout 508 showcommand timeout 509 end 510 end 511
Note:
See TracChangeset
for help on using the changeset viewer.
