IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 24428


Ignore:
Timestamp:
Jun 16, 2009, 10:21:18 AM (17 years ago)
Author:
Paul Price
Message:

Moving workdir under publishClient so it doesn't have to be defined for every run (which is going to run regularly under pantasks)

Location:
branches/pap_mops
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • branches/pap_mops/dbconfig/changes.txt

    r24377 r24428  
    11281128
    11291129-- Tables to support publishing of detections to a Science Client
     1130
    11301131-- Clients to which we send stuff
    11311132CREATE TABLE publishClient (
    11321133    client_id BIGINT AUTO_INCREMENT, -- unique identifier
     1134    product VARCHAR(64),             -- product name
     1135    stage VARCHAR(64) NOT NULL, -- stage of interest (chip, camera, diff, etc.)
     1136    workdir VARCHAR(255) NOT NULL, -- working directory
    11331137    comment VARCHAR(255),            -- for human memory
    1134     stage VARCHAR(64) NOT NULL, -- stage of interest (chip, camera, diff, etc.)
    1135     format VARCHAR(64),              -- format of data
    1136     destination VARCHAR(255) NOT NULL, -- where to send data
    11371138    PRIMARY KEY(client_id)
    11381139) ENGINE=innodb DEFAULT CHARSET=latin1;
     
    11521153) ENGINE=innodb DEFAULT CHARSET=latin1;
    11531154-- Publishing a file within a set
    1154 CREATE TABLE publishFile (
     1155CREATE TABLE publishDone (
    11551156    pub_id BIGINT AUTO_INCREMENT, -- link to publishRun
    1156     component VARCHAR(64),        -- analagous to class_id or skycell_id
     1157    path_base VARCHAR(255),     -- base path of output
    11571158    fault SMALLINT NOT NULL DEFAULT 0, -- Fault code
    1158     PRIMARY KEY(pub_id, component),
    1159     KEY(component),
     1159    PRIMARY KEY(pub_id),
    11601160    KEY(fault),
    11611161    FOREIGN KEY(pub_id) REFERENCES publishRun(pub_id)
    11621162) ENGINE=innodb DEFAULT CHARSET=latin1;
     1163
  • branches/pap_mops/dbconfig/publish.md

    r24427 r24428  
    55    product     STR         64
    66    stage       STR         64
     7    workdir     STR         255
    78    comment     STR         255
    89END
     
    1213    client_id   S64         0
    1314    stage_id    S64         0
    14     workdir     STR         255
    1515    label       STR         64
    1616    state       STR         64
  • branches/pap_mops/ippTools/doc/publish_flow.txt

    r24427 r24428  
    11### Setup
    2 pubtool -defineclient -stage diff -comment Comment -destination DataStore -format MOPS
     2pubtool -defineclient -stage diff -comment Comment -product IPP-MOPS -workdir /path/to/somewhere
    33
    44### Regularly run by pantasks to generate publishing runs based on data that has been processed
    5 pubtool -definerun -workdir /path/to/somewhere
     5pubtool -definerun
    66
    77### Regularly run by pantasks to get list of files to publish
  • branches/pap_mops/ippTools/share/pubtool_pending.sql

    r24427 r24428  
    66        publishClient.product,
    77        publishClient.stage,
    8         diffRun.diff_id AS stage_id,
    9         publishRun.workdir
     8        publishClient.workdir,
     9        diffRun.diff_id AS stage_id
    1010    FROM publishRun
    1111    JOIN publishClient USING(client_id)
     
    2121        publishClient.product,
    2222        publishClient.stage,
    23         camRun.cam_id AS stage_id,
    24         publishRun.workdir
     23        publishClient.workdir,
     24        camRun.cam_id AS stage_id
    2525    FROM publishRun
    2626    JOIN publishClient USING(client_id)
  • branches/pap_mops/ippTools/share/pxadmin_create_tables.sql

    r24427 r24428  
    13761376    product VARCHAR(64),             -- product name
    13771377    stage VARCHAR(64) NOT NULL, -- stage of interest (chip, camera, diff, etc.)
     1378    workdir VARCHAR(255) NOT NULL, -- working directory
    13781379    comment VARCHAR(255),            -- for human memory
    13791380    PRIMARY KEY(client_id)
     
    13851386    client_id BIGINT NOT NULL,  -- link to publishClient
    13861387    stage_id BIGINT NOT NULL,   -- link to various stage tables
    1387     workdir VARCHAR(255) NOT NULL, -- working directory
    13881388    label VARCHAR(64),          -- label for run
    13891389    state VARCHAR(64),          -- state of run (new, full, etc.)
  • branches/pap_mops/ippTools/src/pubtool.c

    r24427 r24428  
    8989    PXOPT_LOOKUP_STR(product, config->args, "-product",  true, false);
    9090    PXOPT_LOOKUP_STR(stage, config->args, "-stage", true, false);
     91    PXOPT_LOOKUP_STR(workdir, config->args, "-workdir",  true, false);
    9192
    9293    // optional
    9394    PXOPT_LOOKUP_STR(comment, config->args, "-comment",  false, false);
    9495
    95     if (!publishClientInsert(config->dbh, 0, product, stage, comment)) {
     96    if (!publishClientInsert(config->dbh, 0, product, stage, workdir, comment)) {
    9697        psError(PS_ERR_UNKNOWN, false, "Database error");
    9798        return false;
     
    108109
    109110    // required
    110     PXOPT_LOOKUP_STR(workdir, config->args, "-workdir",  true, false);
    111111
    112112    // optional
     
    171171        psS64 stage = psMetadataLookupS64(NULL, row, "stage_id");   // Stage identifier
    172172
    173         if (!publishRunInsert(config->dbh, 0, client, stage, workdir, set_label, "new")) {
     173        if (!publishRunInsert(config->dbh, 0, client, stage, set_label, "new")) {
    174174            psError(PS_ERR_UNKNOWN, false, "Unable to add fileset");
    175175            psFree(output);
Note: See TracChangeset for help on using the changeset viewer.