IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 24038


Ignore:
Timestamp:
May 1, 2009, 5:28:52 PM (17 years ago)
Author:
bills
Message:

on receive side of distribution, optionally create a fileset in a status data store
defer {$stage}tool -importrun until all of the files have been downloaded
in the dist.queuruns task queue rcruns

Location:
trunk
Files:
2 added
16 edited

Legend:

Unmodified
Added
Removed
  • trunk/dbconfig/changes.txt

    r23953 r24038  
    10881088-- This key makes it faster to find the ccd_temp for XY24
    10891089ALTER TABLE rawImfile ADD KEY(dateobs);
     1090
     1091ALTER TABLE receiveSource ADD COLUMN status_product VARCHAR(64);
     1092ALTER TABLE receiveSource ADD COLUMN ds_dbname VARCHAR(64);
     1093ALTER TABLE receiveSource ADD COLUMN ds_dbhost VARCHAR(64);
     1094
     1095ALTER TABLE receiveFileset ADD COLUMN state VARCHAR(64);
     1096ALTER TABLE receiveFileset ADD COLUMN dbinfo_uri VARCHAR(255);
     1097ALTER TABLE receiveFileset ADD COLUMN fault SMALLINT NOT NULL DEFAULT 0;
  • trunk/dbconfig/receive.md

    r23885 r24038  
    88        comment         STR     255     # Key
    99        fileset_last    STR     128
     10        status_product  STR     64
     11        ds_dbname       STR     64
     12        ds_dbhost       STR     64
    1013END
    1114
    … …  
    1417        source_id       S64     0       # Key fkey (source_id) ref receiveSource(source_id)
    1518        fileset         STR     128
     19        state           STR     64
     20        dbinfo_uri      STR     255
     21        fault           S32     0       # Key
    1622END
    1723
  • trunk/ippScripts/Build.PL

    r24001 r24038  
    8787        scripts/receive_fileset.pl
    8888        scripts/receive_file.pl
     89        scripts/receive_advance.pl
     90        scripts/receive_setstatus.pl
    8991        scripts/rcserver_checkstatus.pl
    9092    )],
  • trunk/ippScripts/scripts/dist_queue_runs.pl

    r24001 r24038  
    9898}
    9999
     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
    100114exit 0;
    101115
  • trunk/ippScripts/scripts/receive_file.pl

    r23895 r24038  
    3636
    3737# Parse the command-line arguments
    38 my ( $file_id, $source, $product, $fileset, $file, $workdir, $dbname, $verbose, $no_update, $save_temps );
     38my ( $file_id, $source, $product, $fileset, $fileset_id, $file, $workdir, $dbname, $verbose, $no_update, $save_temps );
    3939
    4040GetOptions(
    … …  
    4343           'product=s'         => \$product, # Product for data
    4444           'fileset=s'         => \$fileset, # Fileset for data
     45           'fileset_id=s'      => \$fileset_id, # database id for the fileset
    4546           'file=s'            => \$file, # File to retrieve
    4647           'workdir=s'         => \$workdir, # Working directory for output
    … …  
    6162    defined $workdir;
    6263
     64$tempdir .= "/$file_id";
     65
    6366my $ipprc = PS::IPP::Config->new() or
    6467    &my_die( "Unable to set up", $file_id, $PS_EXIT_CONFIG_ERROR ); # IPP configuration
    … …  
    8083    # Load into database
    8184
     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
    8291    # Need to fix paths to point to new workdir
    83     my ($fixFile, $fixName) = tempfile( "$tempdir/$file.XXXX", UNLINK => !$save_temps ); # Fixed file
    8492    open my $inFile, $filename or die "Can't open $filename\n"; # Input file
    8593    my $workdir_old;            # Old workdir
    … …  
    98106    }
    99107    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
    105111    $command .= " -dbname $dbname" if defined $dbname;
    106112    my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    107113        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
    109117} elsif ($file =~ m|.*\.tgz$|) {
    110118    # Get contents of tarball
  • trunk/ippScripts/scripts/receive_setstatus.pl

    r24031 r24038  
    5151
    5252pod2usage( -msg => "Unknown option: @ARGV", -exitval => 2 ) if @ARGV;
    53 pod2usage( -msg => "Required options: --dest_id --status_uri",
     53pod2usage( -msg => "Required options: --status_fs_name --status_product",
    5454           -exitval => 3) unless
    55     defined $status_fs_name and
     55    defined $received_fs_name and
    5656    defined $status_product and
    5757    defined $fault;
    5858#    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;
    5962
    6063$ipprc->redirect_output($logfile) if $logfile;
  • trunk/ippTasks/dist.pro

    r24001 r24038  
    4242    active true
    4343  end
     44  task dist.queueruns
     45    active true
     46  end
    4447end
    4548macro dist.off
    … …  
    5457  end
    5558  task dist.advance.run
     59    active false
     60  end
     61  task dist.queueruns
    5662    active false
    5763  end
    … …  
    298304
    299305  periods      -poll $RUNPOLL
    300   periods      -exec 10
     306  periods      -exec 30
    301307  periods      -timeout 45
    302308  npending     1
  • trunk/ippTasks/rcserver.pro

    r23912 r24038  
    173173
    174174  periods      -poll $LOADPOLL
    175   periods      -exec $LOADEXEC
     175#  periods      -exec $LOADEXEC
     176  periods      -exec 20
    176177  periods      -timeout 30
    177178  npending     1
  • trunk/ippTasks/receive.pro

    r23899 r24038  
    2020###
    2121### 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
    2225
    2326# test for required global variables
    … …  
    2730book init receiveFileset
    2831book init receiveFile
     32book init receiveAdvance
    2933
    3034macro receive.status
    … …  
    3236  book listbook receiveFileset
    3337  book listbook receiveFile
     38  book listbook receiveAdvance
    3439end
    3540
    … …  
    3843  book init receiveFileset
    3944  book init receiveFile
     45  book init receiveAdvance
    4046end
    4147
    … …  
    5965    active true
    6066  end
     67  task receive.advance.load
     68    active true
     69  end
     70  task receive.advance.run
     71    active true
     72  end
    6173end
    6274
    … …  
    8092    active false
    8193  end
     94  task receive.advance.load
     95    active false
     96  end
     97  task receive.advance.run
     98    active false
     99  end
    82100end
    83101
    … …  
    85103# this variable will cycle through the known database names
    86104$receive_DB = 0
     105$receive_Advance_DB = 0
    87106
    88107task           receive.source.load
    … …  
    380399    book getword receiveFile $pageName product -var PRODUCT
    381400    book getword receiveFile $pageName fileset -var FILESET
     401    book getword receiveFile $pageName fileset_id -var FILESET_ID
    382402    book getword receiveFile $pageName file -var FILE
    383403    book getword receiveFile $pageName workdir -var WORKDIR
    … …  
    388408    stderr $LOGDIR/receive.file.log
    389409
    390     $run = receive_file.pl --file_id $FILE_ID --source $SOURCE --product $PRODUCT --fileset $FILESET --file $FILE --workdir $WORKDIR
     410    $run = receive_file.pl --file_id $FILE_ID --source $SOURCE --product $PRODUCT --fileset $FILESET --fileset_id $FILESET_ID --file $FILE --workdir $WORKDIR
    391411    add_standard_args run
    392412
    … …  
    419439  end
    420440end
     441
     442task           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
     493end
     494
     495task           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
     550end
  • trunk/ippTools/share/Makefile.am

    r23912 r24038  
    179179     receivetool_pendingfile.sql \
    180180     receivetool_revert.sql \
     181     receivetool_toadvance.sql \
    181182     regtool_create_dup_table.sql \
    182183     regtool_export_exp.sql \
  • trunk/ippTools/share/pxadmin_create_tables.sql

    r23953 r24038  
    13151315    comment VARCHAR(255),       -- for human memory
    13161316    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
    13171320    PRIMARY KEY(source_id),
    13181321    KEY(source),
    … …  
    13261329    source_id BIGINT NOT NULL,  -- link to receiveSource
    13271330    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
    13281334    PRIMARY KEY(fileset_id),
    13291335    KEY(source_id),
  • trunk/ippTools/share/receivetool_pendingfile.sql

    r23894 r24038  
    55    workdir,
    66    fileset,
     7    fileset_id,
    78    file
    89FROM receiveFile
  • trunk/ippTools/src/Makefile.am

    r23921 r24038  
    1919        regtool \
    2020        stacktool \
    21         warptool
    22 
    23 #       receivetool
     21        warptool \
     22        receivetool
    2423
    2524
  • trunk/ippTools/src/receivetool.c

    r23898 r24038  
    11/*
    2  * disttool.c
     2 * receivetool.c
    33 *
    44 * Copyright (C) 2008
    … …  
    3636static bool updatelastMode(pxConfig *config);
    3737static bool pendingfilesetMode(pxConfig *config);
     38static bool updatefilesetMode(pxConfig *config);
    3839static bool addfileMode(pxConfig *config);
    3940static bool pendingfileMode(pxConfig *config);
    4041static bool addresultMode(pxConfig *config);
     42static bool toadvanceMode(pxConfig *config);
    4143static bool revertMode(pxConfig *config);
    4244
    … …  
    6567        MODECASE(RECEIVETOOL_MODE_UPDATELAST, updatelastMode);
    6668        MODECASE(RECEIVETOOL_MODE_PENDINGFILESET, pendingfilesetMode);
     69        MODECASE(RECEIVETOOL_MODE_UPDATEFILESET, updatefilesetMode);
     70        MODECASE(RECEIVETOOL_MODE_TOADVANCE, toadvanceMode);
    6771        MODECASE(RECEIVETOOL_MODE_ADDFILE, addfileMode);
    6872        MODECASE(RECEIVETOOL_MODE_PENDINGFILE, pendingfileMode);
    … …  
    102106    PXOPT_LOOKUP_STR(comment, config->args, "-comment",  false, false);
    103107    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)) {
    106113        psError(PS_ERR_UNKNOWN, false, "Database error");
    107114        return false;
    … …  
    231238        psFree(output);
    232239
    233         if (!receiveFilesetInsert(config->dbh, 0, source_id, fileset)) {
     240        if (!receiveFilesetInsert(config->dbh, 0, source_id, fileset, "new", NULL, 0)) {
    234241            psError(PS_ERR_UNKNOWN, false, "Unable to add fileset");
    235242            psFree(source_id_str);
    … …  
    391398    PXOPT_COPY_STR(config->args, where, "-product", "receiveSource.product", "==");
    392399    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", "==");
    394402
    395403    // optional
    … …  
    499507    return true;
    500508}
     509static 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
     566static 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  
    3030    RECEIVETOOL_MODE_UPDATELAST,
    3131    RECEIVETOOL_MODE_PENDINGFILESET,
     32    RECEIVETOOL_MODE_UPDATEFILESET,
     33    RECEIVETOOL_MODE_TOADVANCE,
    3234    RECEIVETOOL_MODE_ADDFILE,
    3335    RECEIVETOOL_MODE_PENDINGFILE,
  • trunk/ippTools/src/receivetoolConfig.c

    r23898 r24038  
    5050    psMetadataAddStr(definesourceArgs, PS_LIST_TAIL, "-comment", 0, "define comment", NULL);
    5151    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);
    5255
    5356    // -list
    … …  
    7477    psMetadataAddStr(pendingfilesetArgs, PS_LIST_TAIL, "-product", 0, "search on product", NULL);
    7578    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);
    7680    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);
    7889
    7990    // -addfile
    … …  
    8899    psMetadataAddStr(pendingfileArgs, PS_LIST_TAIL, "-comment", 0, "search on comment (LIKE)", NULL);
    89100    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);
    90102    psMetadataAddU64(pendingfileArgs, PS_LIST_TAIL, "-limit",  0, "limit result set", 0);
    91103    psMetadataAddBool(pendingfileArgs, PS_LIST_TAIL, "-simple",  0, "use simple output format?", false);
     104    psMetadataAddStr(pendingfileArgs, PS_LIST_TAIL, "-label", 0, "search on label", NULL);
    92105
    93106    // -addresult
    … …  
    107120    psMetadataAddStr(revertArgs, PS_LIST_TAIL, "-comment", 0, "search on comment (LIKE)", NULL);
    108121
     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
    109131    psMetadata *argSets = psMetadataAlloc();
    110132    psMetadata *modes = psMetadataAlloc();
    … …  
    114136    PXOPT_ADD_MODE("-addfileset", "", RECEIVETOOL_MODE_ADDFILESET, addfilesetArgs);
    115137    PXOPT_ADD_MODE("-updatelast", "", RECEIVETOOL_MODE_UPDATELAST, updatelastArgs);
     138    PXOPT_ADD_MODE("-updatefileset", "", RECEIVETOOL_MODE_UPDATEFILESET, updatefilesetArgs);
    116139    PXOPT_ADD_MODE("-pendingfileset", "", RECEIVETOOL_MODE_PENDINGFILESET, pendingfilesetArgs);
     140    PXOPT_ADD_MODE("-toadvance", "", RECEIVETOOL_MODE_TOADVANCE, toadvanceArgs);
    117141    PXOPT_ADD_MODE("-addfile", "", RECEIVETOOL_MODE_ADDFILE, addfileArgs);
    118142    PXOPT_ADD_MODE("-pendingfile", "", RECEIVETOOL_MODE_PENDINGFILE, pendingfileArgs);
Note: See TracChangeset for help on using the changeset viewer.