Changeset 33027
- Timestamp:
- Dec 27, 2011, 11:34:14 AM (15 years ago)
- Location:
- branches/haf_add201112
- Files:
-
- 4 edited
-
ippScripts/scripts/addstar_run.pl (modified) (4 diffs)
-
ippTasks/addstar.pro (modified) (5 diffs)
-
ippTools/src/addtool.c (modified) (3 diffs)
-
ippTools/src/addtoolConfig.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/haf_add201112/ippScripts/scripts/addstar_run.pl
r33023 r33027 38 38 } 39 39 my $minidvodb_path; 40 my $stage_extra1; 40 41 my ( $add_id, $camera, $stage, $stage_id, $multi_num, $outroot, $stageroot, $dbname, $reduction, $dvodb, $minidvodb, $minidvodb_name, $minidvodb_group, $image_only, $verbose, $no_update, 41 42 $no_op, $redirect, $save_temps); … … 151 152 #is this cam_id magicked or not? 152 153 if ($magicked) { 154 $stage_extra1 = $magicked; 153 155 $fpaObjects = $ipprc->destreaked_filename("$fpaObjects") or &my_die("Missing entry from camera config", $add_id, $PS_EXIT_CONFIG_ERROR); 154 156 print "cam_id is magicked, using $fpaObjects for the cam smf\n"; … … 251 253 $fpaCommand .= " -dvodb_path $minidvodb_path" if defined $minidvodb_path; 252 254 $fpaCommand .= " -minidvodb_name $minidvodb_name" if defined $minidvodb_name; 255 $fpaCommand .= " -stage_extra1" if defined $stage_extra1; 253 256 $fpaCommand .= " -dbname $dbname" if defined $dbname; 254 257 print $fpaCommand; … … 283 286 $command .= " -path_base $outroot" if defined $outroot; 284 287 $command .= (" -dtime_addstar " . ((DateTime->now->mjd - $mjd_start) * 86400)); 285 $fpaCommand .= " -minidvodb_name $minidvodb_name" if defined $minidvodb_name; 288 # $command .= " -minidvodb_name $minidvodb_name" if defined $minidvodb_name; don't think we want it recorded (not sure) 289 $command .= " -stage_extra1 $stage_extra1" if defined $stage_extra1; 286 290 $command .= " -dbname $dbname" if defined $dbname; 291 print $command; 287 292 system ($command); 288 293 } -
branches/haf_add201112/ippTasks/addstar.pro
r33022 r33027 53 53 54 54 macro addstar.revert.off 55 task addstar.revert 55 task addstar.revert.cam 56 active false 57 end 58 task addstar.revert.stack 59 active false 60 end 61 task addstar.revert.staticsky 62 active false 63 end 64 task addstar.revert.staticsky_multi 56 65 active false 57 66 end 58 67 end 59 68 macro addstar.revert.on 60 task addstar.revert 69 task addstar.revert.cam 70 active true 71 end 72 task addstar.revert.stack 73 active true 74 end 75 task addstar.revert.staticsky_multi 76 active true 77 end 78 task addstar.revert.staticsky 61 79 active true 62 80 end … … 65 83 66 84 # this variable will cycle through the known database names 67 $addstar_DB = 0 68 $addstar_revert_DB = 0 85 $addstar_DB = 0 86 #this may not work for more databases (addstar) will do that later) 87 $addstar_revert_DB_C = 0 88 $addstar_revert_DB_S = 0 89 $addstar_revert_DB_SS = 0 90 $addstar_revert_DB_SSM = 0 69 91 70 92 … … 415 437 end 416 438 417 task addstar.revert 439 task addstar.revert.cam 418 440 host local 419 441 … … 429 451 task.exec 430 452 if ($LABEL:n == 0) break 431 $run = addtool -revertprocessedexp 432 if ($DB:n == 0) 433 option DEFAULT 434 else 435 # save the DB name for the exit tasks 436 option $DB:$addstar_revert_DB 437 $run = $run -dbname $DB:$addstar_revert_DB 438 $addstar_revert_DB ++439 if ($addstar_revert_DB >= $DB:n) set addstar_revert_DB= 0453 $run = addtool -revertprocessedexp -stage cam 454 if ($DB:n == 0) 455 option DEFAULT 456 else 457 # save the DB name for the exit tasks 458 option $DB:$addstar_revert_DB_C 459 $run = $run -dbname $DB:$addstar_revert_DB_C 460 $addstar_revert_DB_C ++ 461 if ($addstar_revert_DB_C >= $DB:n) set addstar_revert_DB_C = 0 440 462 end 441 463 add_poll_labels run … … 461 483 end 462 484 end 485 task addstar.revert.stack 486 host local 487 488 periods -poll 5.0 489 periods -exec 60.0 490 periods -timeout 1200 491 npending 1 492 active false 493 494 stdout NULL 495 stderr $LOGDIR/revert.log 496 497 task.exec 498 if ($LABEL:n == 0) break 499 $run = addtool -revertprocessedexp -stage stack 500 if ($DB:n == 0) 501 option DEFAULT 502 else 503 # save the DB name for the exit tasks 504 option $DB:$addstar_revert_DB_S 505 $run = $run -dbname $DB:$addstar_revert_DB_S 506 $addstar_revert_DB_S ++ 507 if ($addstar_revert_DB_S >= $DB:n) set addstar_revert_DB_S = 0 508 end 509 add_poll_labels run 510 command $run 511 end 512 513 # success 514 task.exit 0 515 end 516 517 # locked list 518 task.exit default 519 showcommand failure 520 end 521 522 task.exit crash 523 showcommand crash 524 end 525 526 # operation times out? 527 task.exit timeout 528 showcommand timeout 529 end 530 end 531 task addstar.revert.staticsky 532 host local 533 534 periods -poll 5.0 535 periods -exec 60.0 536 periods -timeout 1200 537 npending 1 538 active false 539 540 stdout NULL 541 stderr $LOGDIR/revert.log 542 543 task.exec 544 if ($LABEL:n == 0) break 545 $run = addtool -revertprocessedexp -stage staticsky 546 if ($DB:n == 0) 547 option DEFAULT 548 else 549 # save the DB name for the exit tasks 550 option $DB:$addstar_revert_DB_SS 551 $run = $run -dbname $DB:$addstar_revert_DB_SS 552 $addstar_revert_DB_SS ++ 553 if ($addstar_revert_DB_SS >= $DB:n) set addstar_revert_DB_SS = 0 554 end 555 add_poll_labels run 556 command $run 557 end 558 559 # success 560 task.exit 0 561 end 562 563 # locked list 564 task.exit default 565 showcommand failure 566 end 567 568 task.exit crash 569 showcommand crash 570 end 571 572 # operation times out? 573 task.exit timeout 574 showcommand timeout 575 end 576 end 577 task addstar.revert.staticsky_multi 578 host local 579 580 periods -poll 5.0 581 periods -exec 60.0 582 periods -timeout 1200 583 npending 1 584 active false 585 586 stdout NULL 587 stderr $LOGDIR/revert.log 588 589 task.exec 590 if ($LABEL:n == 0) break 591 $run = addtool -revertprocessedexp -stage staticsky_multi 592 if ($DB:n == 0) 593 option DEFAULT 594 else 595 # save the DB name for the exit tasks 596 option $DB:$addstar_revert_DB_SSM 597 $run = $run -dbname $DB:$addstar_revert_DB_SSM 598 $addstar_revert_DB_SSM ++ 599 if ($addstar_revert_DB_SSM >= $DB:n) set addstar_revert_DB_SSM = 0 600 end 601 add_poll_labels run 602 command $run 603 end 604 605 # success 606 task.exit 0 607 end 608 609 # locked list 610 task.exit default 611 showcommand failure 612 end 613 614 task.exit crash 615 showcommand crash 616 end 617 618 # operation times out? 619 task.exit timeout 620 showcommand timeout 621 end 622 end -
branches/haf_add201112/ippTools/src/addtool.c
r33023 r33027 825 825 PXOPT_LOOKUP_STR(minidvodb_name, config->args, "-minidvodb_name", false, false); 826 826 PXOPT_LOOKUP_S16(fault, config->args, "-fault", false, false); 827 827 PXOPT_LOOKUP_S64(stage_extra1, config->args, "-stage_extra1", false, false); 828 828 // generate restrictions 829 829 psMetadata *where = psMetadataAlloc(); … … 903 903 } 904 904 } 905 905 //if there is a stage_extra1, set it in addRun (it's not known until it is processed) 906 if (stage_extra1) { 907 psString setExtra = NULL; 908 psStringAppend (&setExtra, "UPDATE addRun set stage_extra1 = %" PRId64, stage_extra1); 909 psStringAppend (&setExtra, " where add_id = %" PRId64, row->add_id); 910 911 if (!p_psDBRunQuery(config->dbh, setExtra)) { 912 if (!psDBRollback(config->dbh)) { 913 psError(PS_ERR_UNKNOWN, false, "database error"); 914 } 915 psError(PS_ERR_UNKNOWN, false, "database error"); 916 917 return false; 918 } 919 } 906 920 907 921 … … 1050 1064 PXOPT_COPY_S64(config->args, where, "-add_id", "addRun.add_id", "=="); 1051 1065 PXOPT_COPY_S64(config->args, where, "-stage_id", "addRun.stage_id", "=="); 1052 PXOPT_LOOKUP_STR(stage, config->args, "-stage", false, false);1066 PXOPT_LOOKUP_STR(stage, config->args, "-stage", true, false); 1053 1067 pxcamGetSearchArgs (config, where); 1054 1068 pxAddLabelSearchArgs (config, where, "-label", "addRun.label", "=="); -
branches/haf_add201112/ippTools/src/addtoolConfig.c
r33003 r33027 115 115 psMetadataAddF32(addprocessedexpArgs, PS_LIST_TAIL, "-dtime_addstar", 0, "define elapsed time for DVO insertion (seconds)", NAN); 116 116 psMetadataAddS16(addprocessedexpArgs, PS_LIST_TAIL, "-fault", 0, "set fault code", 0); 117 psMetadataAddS64(addprocessedexpArgs, PS_LIST_TAIL, "-stage_extra1", 0, "set stage_extra1", 0); 118 117 119 118 120 // -processedexp
Note:
See TracChangeset
for help on using the changeset viewer.
