Changeset 24038
- Timestamp:
- May 1, 2009, 5:28:52 PM (17 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 16 edited
-
dbconfig/changes.txt (modified) (1 diff)
-
dbconfig/receive.md (modified) (2 diffs)
-
ippScripts/Build.PL (modified) (1 diff)
-
ippScripts/scripts/dist_queue_runs.pl (modified) (1 diff)
-
ippScripts/scripts/receive_advance.pl (added)
-
ippScripts/scripts/receive_file.pl (modified) (5 diffs)
-
ippScripts/scripts/receive_setstatus.pl (modified) (1 diff)
-
ippTasks/dist.pro (modified) (3 diffs)
-
ippTasks/rcserver.pro (modified) (1 diff)
-
ippTasks/receive.pro (modified) (10 diffs)
-
ippTools/share/Makefile.am (modified) (1 diff)
-
ippTools/share/pxadmin_create_tables.sql (modified) (2 diffs)
-
ippTools/share/receivetool_pendingfile.sql (modified) (1 diff)
-
ippTools/share/receivetool_toadvance.sql (added)
-
ippTools/src/Makefile.am (modified) (1 diff)
-
ippTools/src/receivetool.c (modified) (7 diffs)
-
ippTools/src/receivetool.h (modified) (1 diff)
-
ippTools/src/receivetoolConfig.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/dbconfig/changes.txt
r23953 r24038 1088 1088 -- This key makes it faster to find the ccd_temp for XY24 1089 1089 ALTER TABLE rawImfile ADD KEY(dateobs); 1090 1091 ALTER TABLE receiveSource ADD COLUMN status_product VARCHAR(64); 1092 ALTER TABLE receiveSource ADD COLUMN ds_dbname VARCHAR(64); 1093 ALTER TABLE receiveSource ADD COLUMN ds_dbhost VARCHAR(64); 1094 1095 ALTER TABLE receiveFileset ADD COLUMN state VARCHAR(64); 1096 ALTER TABLE receiveFileset ADD COLUMN dbinfo_uri VARCHAR(255); 1097 ALTER TABLE receiveFileset ADD COLUMN fault SMALLINT NOT NULL DEFAULT 0; -
trunk/dbconfig/receive.md
r23885 r24038 8 8 comment STR 255 # Key 9 9 fileset_last STR 128 10 status_product STR 64 11 ds_dbname STR 64 12 ds_dbhost STR 64 10 13 END 11 14 … … 14 17 source_id S64 0 # Key fkey (source_id) ref receiveSource(source_id) 15 18 fileset STR 128 19 state STR 64 20 dbinfo_uri STR 255 21 fault S32 0 # Key 16 22 END 17 23 -
trunk/ippScripts/Build.PL
r24001 r24038 87 87 scripts/receive_fileset.pl 88 88 scripts/receive_file.pl 89 scripts/receive_advance.pl 90 scripts/receive_setstatus.pl 89 91 scripts/rcserver_checkstatus.pl 90 92 )], -
trunk/ippScripts/scripts/dist_queue_runs.pl
r24001 r24038 98 98 } 99 99 100 # queue rcRuns for any distRuns that have completed and have interested destinations 101 { 102 my $command = "$disttool -queuercrun"; 103 $command .= " -dbname $dbname" if defined $dbname; 104 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 105 run(command => $command, verbose => $verbose); 106 unless ($success) { 107 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); 108 &my_die("Unable to perform $command error_code: $error_code", $error_code); 109 } 110 # display the output from the command 111 print STDERR join "", @$stdout_buf if $verbose; 112 } 113 100 114 exit 0; 101 115 -
trunk/ippScripts/scripts/receive_file.pl
r23895 r24038 36 36 37 37 # Parse the command-line arguments 38 my ( $file_id, $source, $product, $fileset, $file , $workdir, $dbname, $verbose, $no_update, $save_temps );38 my ( $file_id, $source, $product, $fileset, $fileset_id, $file, $workdir, $dbname, $verbose, $no_update, $save_temps ); 39 39 40 40 GetOptions( … … 43 43 'product=s' => \$product, # Product for data 44 44 'fileset=s' => \$fileset, # Fileset for data 45 'fileset_id=s' => \$fileset_id, # database id for the fileset 45 46 'file=s' => \$file, # File to retrieve 46 47 'workdir=s' => \$workdir, # Working directory for output … … 61 62 defined $workdir; 62 63 64 $tempdir .= "/$file_id"; 65 63 66 my $ipprc = PS::IPP::Config->new() or 64 67 &my_die( "Unable to set up", $file_id, $PS_EXIT_CONFIG_ERROR ); # IPP configuration … … 80 83 # Load into database 81 84 85 my $target = "$workdir/$file"; # Target destination for file 86 my $fixName = $ipprc->file_create( $target ); # Target for move 87 my $fixFile; 88 89 open $fixFile, ">$fixName" or die "can't open $fixName\n"; 90 82 91 # Need to fix paths to point to new workdir 83 my ($fixFile, $fixName) = tempfile( "$tempdir/$file.XXXX", UNLINK => !$save_temps ); # Fixed file84 92 open my $inFile, $filename or die "Can't open $filename\n"; # Input file 85 93 my $workdir_old; # Old workdir … … 98 106 } 99 107 close($inFile); 100 101 my ($stage) = $file =~ m|^dbinfo\.(\S+)\.\d+\.mdc$|; # Stage of interest 102 my $tool = can_run("${stage}tool") or die "Can't find tool to load $file\n"; 103 104 my $command = "$tool -importrun -infile $fixName"; # Command to execute 108 close($fixFile); 109 #{ 110 my $command = "$receivetool -updatefileset -fileset_id $fileset_id -dbinfo_uri $fixName"; # Command to execute 105 111 $command .= " -dbname $dbname" if defined $dbname; 106 112 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 107 113 run(command => $command, verbose => $verbose); 108 die "Unable to load $fixName\n" unless $success; 114 die "Unable to set dbinfo_uri for $fileset_id to $fixName\n" unless $success; 115 #} 116 109 117 } elsif ($file =~ m|.*\.tgz$|) { 110 118 # Get contents of tarball -
trunk/ippScripts/scripts/receive_setstatus.pl
r24031 r24038 51 51 52 52 pod2usage( -msg => "Unknown option: @ARGV", -exitval => 2 ) if @ARGV; 53 pod2usage( -msg => "Required options: -- dest_id --status_uri",53 pod2usage( -msg => "Required options: --status_fs_name --status_product", 54 54 -exitval => 3) unless 55 defined $ status_fs_name and55 defined $received_fs_name and 56 56 defined $status_product and 57 57 defined $fault; 58 58 # and ($fault == 0 or defined $status_file); 59 60 # if a name for the status fileset is not provided use the received value 61 $status_fs_name = $received_fs_name if !defined $status_fs_name; 59 62 60 63 $ipprc->redirect_output($logfile) if $logfile; -
trunk/ippTasks/dist.pro
r24001 r24038 42 42 active true 43 43 end 44 task dist.queueruns 45 active true 46 end 44 47 end 45 48 macro dist.off … … 54 57 end 55 58 task dist.advance.run 59 active false 60 end 61 task dist.queueruns 56 62 active false 57 63 end … … 298 304 299 305 periods -poll $RUNPOLL 300 periods -exec 10306 periods -exec 30 301 307 periods -timeout 45 302 308 npending 1 -
trunk/ippTasks/rcserver.pro
r23912 r24038 173 173 174 174 periods -poll $LOADPOLL 175 periods -exec $LOADEXEC 175 # periods -exec $LOADEXEC 176 periods -exec 20 176 177 periods -timeout 30 177 178 npending 1 -
trunk/ippTasks/receive.pro
r23899 r24038 20 20 ### 21 21 ### receivetool -revert: remove result after something goes wrong 22 ### 23 ### receivetool -toadvance: filesets for which all files have been downloaded and are ready 24 ### to complete processing 22 25 23 26 # test for required global variables … … 27 30 book init receiveFileset 28 31 book init receiveFile 32 book init receiveAdvance 29 33 30 34 macro receive.status … … 32 36 book listbook receiveFileset 33 37 book listbook receiveFile 38 book listbook receiveAdvance 34 39 end 35 40 … … 38 43 book init receiveFileset 39 44 book init receiveFile 45 book init receiveAdvance 40 46 end 41 47 … … 59 65 active true 60 66 end 67 task receive.advance.load 68 active true 69 end 70 task receive.advance.run 71 active true 72 end 61 73 end 62 74 … … 80 92 active false 81 93 end 94 task receive.advance.load 95 active false 96 end 97 task receive.advance.run 98 active false 99 end 82 100 end 83 101 … … 85 103 # this variable will cycle through the known database names 86 104 $receive_DB = 0 105 $receive_Advance_DB = 0 87 106 88 107 task receive.source.load … … 380 399 book getword receiveFile $pageName product -var PRODUCT 381 400 book getword receiveFile $pageName fileset -var FILESET 401 book getword receiveFile $pageName fileset_id -var FILESET_ID 382 402 book getword receiveFile $pageName file -var FILE 383 403 book getword receiveFile $pageName workdir -var WORKDIR … … 388 408 stderr $LOGDIR/receive.file.log 389 409 390 $run = receive_file.pl --file_id $FILE_ID --source $SOURCE --product $PRODUCT --fileset $FILESET --file $FILE --workdir $WORKDIR410 $run = receive_file.pl --file_id $FILE_ID --source $SOURCE --product $PRODUCT --fileset $FILESET --fileset_id $FILESET_ID --file $FILE --workdir $WORKDIR 391 411 add_standard_args run 392 412 … … 419 439 end 420 440 end 441 442 task receive.advance.load 443 host local 444 445 periods -poll $LOADPOLL 446 periods -exec $LOADEXEC 447 periods -timeout 30 448 npending 1 449 450 stdout NULL 451 stderr $LOGDIR/receive.advance.log 452 453 task.exec 454 $run = receivetool -toadvance 455 if ($DB:n == 0) 456 option DEFAULT 457 else 458 # save the DB name for the exit tasks 459 option $DB:$receive_Advance_DB 460 $run = $run -dbname $DB:$receive_Advance_DB 461 $receive_Advance_DB ++ 462 if ($receive_Advance_DB >= $DB:n) set receive_Advance_DB = 0 463 end 464 add_poll_args run 465 command $run 466 end 467 468 # success 469 task.exit 0 470 # convert 'stdout' to book format 471 ipptool2book stdout receiveAdvance -key fileset_id -uniq -setword dbname $options:0 -setword pantaskState INIT 472 if ($VERBOSE > 2) 473 book listbook receiveAdvance 474 end 475 476 # delete existing entries in the appropriate pantaskStates 477 process_cleanup receiveAdvance 478 end 479 480 # locked list 481 task.exit default 482 showcommand failure 483 end 484 485 task.exit crash 486 showcommand crash 487 end 488 489 # operation times out? 490 task.exit timeout 491 showcommand timeout 492 end 493 end 494 495 task receive.advance.run 496 periods -poll $RUNPOLL 497 periods -exec $RUNEXEC 498 periods -timeout 60 499 500 task.exec 501 book npages receiveAdvance -var N 502 if ($N == 0) break 503 if ($NETWORK == 0) break 504 505 book getpage receiveAdvance 0 -var pageName -key pantaskState INIT 506 if ("$pageName" == "NULL") break 507 508 book setword receiveAdvance $pageName pantaskState RUN 509 book getword receiveAdvance $pageName fileset_id -var FILESET_ID 510 book getword receiveAdvance $pageName fileset -var FILESET 511 book getword receiveAdvance $pageName dbinfo_uri -var DBINFO_URI 512 book getword receiveAdvance $pageName status_product -var STATUS_PRODUCT 513 book getword receiveAdvance $pageName ds_dbname -var DS_DBNAME 514 book getword receiveAdvance $pageName ds_dbhost -var DS_DBHOST 515 book getword receiveAdvance $pageName dbname -var DBNAME 516 517 stdout $LOGDIR/receive.advance.log 518 stderr $LOGDIR/receive.advance.log 519 520 $run = receive_advance.pl --fileset_id $FILESET_ID --fileset $FILESET --dbinfo_uri $DBINFO_URI --status_product $STATUS_PRODUCT --ds_dbname $DS_DBNAME --ds_dbhost $DS_DBHOST 521 add_standard_args run 522 523 # save the pageName for future reference below 524 options $pageName 525 526 # create the command line 527 if ($VERBOSE > 1) 528 echo command $run 529 end 530 command $run 531 end 532 533 # default exit status 534 task.exit default 535 process_exit receiveAdvance $options:0 $JOB_STATUS 536 end 537 538 # locked list 539 task.exit crash 540 showcommand crash 541 echo "hostname: $JOB_HOSTNAME" 542 book setword receiveAdvance $options:0 pantaskState CRASH 543 end 544 545 # operation timed out? 546 task.exit timeout 547 showcommand timeout 548 book setword receiveAdvance $options:0 pantaskState TIMEOUT 549 end 550 end -
trunk/ippTools/share/Makefile.am
r23912 r24038 179 179 receivetool_pendingfile.sql \ 180 180 receivetool_revert.sql \ 181 receivetool_toadvance.sql \ 181 182 regtool_create_dup_table.sql \ 182 183 regtool_export_exp.sql \ -
trunk/ippTools/share/pxadmin_create_tables.sql
r23953 r24038 1315 1315 comment VARCHAR(255), -- for human memory 1316 1316 fileset_last VARCHAR(128), -- last fileset seen 1317 status_product VARCHAR(64), -- status data store product 1318 ds_dbname VARCHAR(64), -- status data store's database name 1319 ds_dbhost VARCHAR(64), -- status data store's host name 1317 1320 PRIMARY KEY(source_id), 1318 1321 KEY(source), … … 1326 1329 source_id BIGINT NOT NULL, -- link to receiveSource 1327 1330 fileset VARCHAR(128) NOT NULL, -- fileset to receive 1331 state VARCHAR(64), -- new or full 1332 dbinfo_uri VARCHAR(255), -- uri for database dump for this fileset's run 1333 fault SMALLINT NOT NULL DEFAULT 0, -- Fault code 1328 1334 PRIMARY KEY(fileset_id), 1329 1335 KEY(source_id), -
trunk/ippTools/share/receivetool_pendingfile.sql
r23894 r24038 5 5 workdir, 6 6 fileset, 7 fileset_id, 7 8 file 8 9 FROM receiveFile -
trunk/ippTools/src/Makefile.am
r23921 r24038 19 19 regtool \ 20 20 stacktool \ 21 warptool 22 23 # receivetool 21 warptool \ 22 receivetool 24 23 25 24 -
trunk/ippTools/src/receivetool.c
r23898 r24038 1 1 /* 2 * disttool.c2 * receivetool.c 3 3 * 4 4 * Copyright (C) 2008 … … 36 36 static bool updatelastMode(pxConfig *config); 37 37 static bool pendingfilesetMode(pxConfig *config); 38 static bool updatefilesetMode(pxConfig *config); 38 39 static bool addfileMode(pxConfig *config); 39 40 static bool pendingfileMode(pxConfig *config); 40 41 static bool addresultMode(pxConfig *config); 42 static bool toadvanceMode(pxConfig *config); 41 43 static bool revertMode(pxConfig *config); 42 44 … … 65 67 MODECASE(RECEIVETOOL_MODE_UPDATELAST, updatelastMode); 66 68 MODECASE(RECEIVETOOL_MODE_PENDINGFILESET, pendingfilesetMode); 69 MODECASE(RECEIVETOOL_MODE_UPDATEFILESET, updatefilesetMode); 70 MODECASE(RECEIVETOOL_MODE_TOADVANCE, toadvanceMode); 67 71 MODECASE(RECEIVETOOL_MODE_ADDFILE, addfileMode); 68 72 MODECASE(RECEIVETOOL_MODE_PENDINGFILE, pendingfileMode); … … 102 106 PXOPT_LOOKUP_STR(comment, config->args, "-comment", false, false); 103 107 PXOPT_LOOKUP_STR(last, config->args, "-last", false, false); 104 105 if (!receiveSourceInsert(config->dbh, 0, source, product, workdir, comment, last)) { 108 PXOPT_LOOKUP_STR(status_product, config->args, "-status_product", false, false); 109 PXOPT_LOOKUP_STR(ds_dbname, config->args, "-ds_dbname", false, false); 110 PXOPT_LOOKUP_STR(ds_dbhost, config->args, "-ds_dbhost", false, false); 111 112 if (!receiveSourceInsert(config->dbh, 0, source, product, workdir, comment, last, status_product, ds_dbname, ds_dbhost)) { 106 113 psError(PS_ERR_UNKNOWN, false, "Database error"); 107 114 return false; … … 231 238 psFree(output); 232 239 233 if (!receiveFilesetInsert(config->dbh, 0, source_id, fileset )) {240 if (!receiveFilesetInsert(config->dbh, 0, source_id, fileset, "new", NULL, 0)) { 234 241 psError(PS_ERR_UNKNOWN, false, "Unable to add fileset"); 235 242 psFree(source_id_str); … … 391 398 PXOPT_COPY_STR(config->args, where, "-product", "receiveSource.product", "=="); 392 399 PXOPT_COPY_STR(config->args, where, "-comment", "receiveSource.comment", "LIKE"); 393 PXOPT_COPY_S64(config->args, where, "-fileset_id", "receiveFile.file_id", "=="); 400 PXOPT_COPY_S64(config->args, where, "-fileset_id", "receiveFile.fileset_id", "=="); 401 PXOPT_COPY_S64(config->args, where, "-file_id", "receiveFile.file_id", "=="); 394 402 395 403 // optional … … 499 507 return true; 500 508 } 509 static bool toadvanceMode(pxConfig *config) 510 { 511 PS_ASSERT_PTR_NON_NULL(config, false); 512 513 psMetadata *where = psMetadataAlloc(); // WHERE conditions 514 515 // optional 516 PXOPT_LOOKUP_U64(limit, config->args, "-limit", false, false); 517 PXOPT_LOOKUP_BOOL(simple, config->args, "-simple", false); 518 519 psString query = pxDataGet("receivetool_toadvance.sql"); 520 if (!query) { 521 psError(PXTOOLS_ERR_DATA, false, "Failed to retreive SQL statement"); 522 psFree(where); 523 return false; 524 } 525 526 if (psListLength(where->list)) { 527 psString whereClause = psDBGenerateWhereConditionSQL(where, NULL); 528 psStringAppend(&query, " AND %s", whereClause); 529 psFree(whereClause); 530 } 531 psFree(where); 532 533 if (limit) { 534 psString limitString = psDBGenerateLimitSQL(limit); 535 psStringAppend(&query, " %s", limitString); 536 psFree(limitString); 537 } 538 539 if (!p_psDBRunQueryF(config->dbh, query)) { 540 psError(PS_ERR_UNKNOWN, false, "Database error"); 541 psFree(query); 542 return false; 543 } 544 psFree(query); 545 546 psArray *output = p_psDBFetchResult(config->dbh); 547 if (!output) { 548 psError(PS_ERR_UNKNOWN, false, "Database error"); 549 return false; 550 } 551 if (!psArrayLength(output)) { 552 psTrace("receivetool", PS_LOG_INFO, "No rows found"); 553 psFree(output); 554 return true; 555 } 556 if (!ippdbPrintMetadatas(stdout, output, "toadvanceFilesets", !simple)) { 557 psError(PS_ERR_UNKNOWN, false, "Failed to print array"); 558 psFree(output); 559 return false; 560 } 561 psFree(output); 562 563 return true; 564 } 565 566 static bool updatefilesetMode(pxConfig *config) 567 { 568 PS_ASSERT_PTR_NON_NULL(config, false); 569 570 // required 571 PXOPT_LOOKUP_S64(fileset_id, config->args, "-fileset_id", true, false); 572 573 // to chanage 574 PXOPT_LOOKUP_S32(fault, config->args, "-fault", false, false); 575 PXOPT_LOOKUP_STR(dbinfo_uri, config->args, "-dbinfo_uri", false, false); 576 PXOPT_LOOKUP_STR(state, config->args, "-set_state", false, false); 577 578 if (!fault && !dbinfo_uri && !state) { 579 psError(PS_ERR_UNKNOWN, true, "one of -fault, -dbinfo_uri, -set_state are required"); 580 return false; 581 } 582 583 psString query = NULL; // Query to execute 584 psStringAppend(&query, "UPDATE receiveFileset SET "); 585 586 psString sep = ""; 587 if (fault) { 588 psStringAppend(&query, "%s fault = %d", sep, fault); 589 sep = ","; 590 } 591 if (dbinfo_uri) { 592 psStringAppend(&query, "%s dbinfo_uri = '%s'", sep, dbinfo_uri); 593 sep = ","; 594 } 595 if (state) { 596 psStringAppend(&query, "%s state = '%s'", sep, state); 597 sep = ","; 598 } 599 600 psStringAppend(&query, " WHERE fileset_id = %" PRId64, fileset_id); 601 602 if (!p_psDBRunQuery(config->dbh, query)) { 603 psError(PS_ERR_UNKNOWN, false, "Database error"); 604 psFree(query); 605 return false; 606 } 607 psFree(query); 608 609 return true; 610 } -
trunk/ippTools/src/receivetool.h
r23885 r24038 30 30 RECEIVETOOL_MODE_UPDATELAST, 31 31 RECEIVETOOL_MODE_PENDINGFILESET, 32 RECEIVETOOL_MODE_UPDATEFILESET, 33 RECEIVETOOL_MODE_TOADVANCE, 32 34 RECEIVETOOL_MODE_ADDFILE, 33 35 RECEIVETOOL_MODE_PENDINGFILE, -
trunk/ippTools/src/receivetoolConfig.c
r23898 r24038 50 50 psMetadataAddStr(definesourceArgs, PS_LIST_TAIL, "-comment", 0, "define comment", NULL); 51 51 psMetadataAddStr(definesourceArgs, PS_LIST_TAIL, "-last", 0, "define last fileset", NULL); 52 psMetadataAddStr(definesourceArgs, PS_LIST_TAIL, "-status_product", 0, "define status_product", NULL); 53 psMetadataAddStr(definesourceArgs, PS_LIST_TAIL, "-ds_dbname", 0, "define ds_dbname", NULL); 54 psMetadataAddStr(definesourceArgs, PS_LIST_TAIL, "-ds_dbhost", 0, "define ds_dbhost", NULL); 52 55 53 56 // -list … … 74 77 psMetadataAddStr(pendingfilesetArgs, PS_LIST_TAIL, "-product", 0, "search on product", NULL); 75 78 psMetadataAddStr(pendingfilesetArgs, PS_LIST_TAIL, "-comment", 0, "search on comment (LIKE)", NULL); 79 psMetadataAddBool(pendingfilesetArgs, PS_LIST_TAIL, "-simple", 0, "use simple output format?", false); 76 80 psMetadataAddU64(pendingfilesetArgs, PS_LIST_TAIL, "-limit", 0, "limit result set", 0); 77 psMetadataAddBool(pendingfilesetArgs, PS_LIST_TAIL, "-simple", 0, "use simple output format?", false); 81 psMetadataAddStr(pendingfilesetArgs, PS_LIST_TAIL, "-label", 0, "search on label", NULL); 82 83 // -updatefileset 84 psMetadata *updatefilesetArgs = psMetadataAlloc(); 85 psMetadataAddS64(updatefilesetArgs, PS_LIST_TAIL, "-fileset_id", 0, "define fileset_id (required)", 0); 86 psMetadataAddStr(updatefilesetArgs, PS_LIST_TAIL, "-set_state", 0, "define state", NULL); 87 psMetadataAddStr(updatefilesetArgs, PS_LIST_TAIL, "-dbinfo_uri", 0, "define dbinfo_uri", NULL); 88 psMetadataAddS32(updatefilesetArgs, PS_LIST_TAIL, "-fault", 0, "define fault code", 0); 78 89 79 90 // -addfile … … 88 99 psMetadataAddStr(pendingfileArgs, PS_LIST_TAIL, "-comment", 0, "search on comment (LIKE)", NULL); 89 100 psMetadataAddS64(pendingfileArgs, PS_LIST_TAIL, "-fileset_id", 0, "search on fileset_id", 0); 101 psMetadataAddS64(pendingfileArgs, PS_LIST_TAIL, "-file_id", 0, "search on file_id", 0); 90 102 psMetadataAddU64(pendingfileArgs, PS_LIST_TAIL, "-limit", 0, "limit result set", 0); 91 103 psMetadataAddBool(pendingfileArgs, PS_LIST_TAIL, "-simple", 0, "use simple output format?", false); 104 psMetadataAddStr(pendingfileArgs, PS_LIST_TAIL, "-label", 0, "search on label", NULL); 92 105 93 106 // -addresult … … 107 120 psMetadataAddStr(revertArgs, PS_LIST_TAIL, "-comment", 0, "search on comment (LIKE)", NULL); 108 121 122 // -toadvance 123 psMetadata *toadvanceArgs = psMetadataAlloc(); 124 psMetadataAddS64(toadvanceArgs, PS_LIST_TAIL, "-fileset_id", 0, "search on fileset_id", 0); 125 psMetadataAddS64(toadvanceArgs, PS_LIST_TAIL, "-source_id", 0, "search on source_id", 0); 126 psMetadataAddU64(toadvanceArgs, PS_LIST_TAIL, "-limit", 0, "limit result set", 0); 127 psMetadataAddBool(toadvanceArgs, PS_LIST_TAIL, "-simple", 0, "use simple output format?", false); 128 // label is not used but pantasks requires it 129 psMetadataAddStr(toadvanceArgs, PS_LIST_TAIL, "-label", 0, "search on label", NULL); 130 109 131 psMetadata *argSets = psMetadataAlloc(); 110 132 psMetadata *modes = psMetadataAlloc(); … … 114 136 PXOPT_ADD_MODE("-addfileset", "", RECEIVETOOL_MODE_ADDFILESET, addfilesetArgs); 115 137 PXOPT_ADD_MODE("-updatelast", "", RECEIVETOOL_MODE_UPDATELAST, updatelastArgs); 138 PXOPT_ADD_MODE("-updatefileset", "", RECEIVETOOL_MODE_UPDATEFILESET, updatefilesetArgs); 116 139 PXOPT_ADD_MODE("-pendingfileset", "", RECEIVETOOL_MODE_PENDINGFILESET, pendingfilesetArgs); 140 PXOPT_ADD_MODE("-toadvance", "", RECEIVETOOL_MODE_TOADVANCE, toadvanceArgs); 117 141 PXOPT_ADD_MODE("-addfile", "", RECEIVETOOL_MODE_ADDFILE, addfileArgs); 118 142 PXOPT_ADD_MODE("-pendingfile", "", RECEIVETOOL_MODE_PENDINGFILE, pendingfileArgs);
Note:
See TracChangeset
for help on using the changeset viewer.
