Changeset 24428
- Timestamp:
- Jun 16, 2009, 10:21:18 AM (17 years ago)
- Location:
- branches/pap_mops
- Files:
-
- 6 edited
-
dbconfig/changes.txt (modified) (2 diffs)
-
dbconfig/publish.md (modified) (2 diffs)
-
ippTools/doc/publish_flow.txt (modified) (1 diff)
-
ippTools/share/pubtool_pending.sql (modified) (2 diffs)
-
ippTools/share/pxadmin_create_tables.sql (modified) (2 diffs)
-
ippTools/src/pubtool.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/pap_mops/dbconfig/changes.txt
r24377 r24428 1128 1128 1129 1129 -- Tables to support publishing of detections to a Science Client 1130 1130 1131 -- Clients to which we send stuff 1131 1132 CREATE TABLE publishClient ( 1132 1133 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 1133 1137 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 data1136 destination VARCHAR(255) NOT NULL, -- where to send data1137 1138 PRIMARY KEY(client_id) 1138 1139 ) ENGINE=innodb DEFAULT CHARSET=latin1; … … 1152 1153 ) ENGINE=innodb DEFAULT CHARSET=latin1; 1153 1154 -- Publishing a file within a set 1154 CREATE TABLE publish File (1155 CREATE TABLE publishDone ( 1155 1156 pub_id BIGINT AUTO_INCREMENT, -- link to publishRun 1156 component VARCHAR(64), -- analagous to class_id or skycell_id1157 path_base VARCHAR(255), -- base path of output 1157 1158 fault SMALLINT NOT NULL DEFAULT 0, -- Fault code 1158 PRIMARY KEY(pub_id, component), 1159 KEY(component), 1159 PRIMARY KEY(pub_id), 1160 1160 KEY(fault), 1161 1161 FOREIGN KEY(pub_id) REFERENCES publishRun(pub_id) 1162 1162 ) ENGINE=innodb DEFAULT CHARSET=latin1; 1163 -
branches/pap_mops/dbconfig/publish.md
r24427 r24428 5 5 product STR 64 6 6 stage STR 64 7 workdir STR 255 7 8 comment STR 255 8 9 END … … 12 13 client_id S64 0 13 14 stage_id S64 0 14 workdir STR 25515 15 label STR 64 16 16 state STR 64 -
branches/pap_mops/ippTools/doc/publish_flow.txt
r24427 r24428 1 1 ### Setup 2 pubtool -defineclient -stage diff -comment Comment - destination DataStore -format MOPS2 pubtool -defineclient -stage diff -comment Comment -product IPP-MOPS -workdir /path/to/somewhere 3 3 4 4 ### Regularly run by pantasks to generate publishing runs based on data that has been processed 5 pubtool -definerun -workdir /path/to/somewhere5 pubtool -definerun 6 6 7 7 ### Regularly run by pantasks to get list of files to publish -
branches/pap_mops/ippTools/share/pubtool_pending.sql
r24427 r24428 6 6 publishClient.product, 7 7 publishClient.stage, 8 diffRun.diff_id AS stage_id,9 publishRun.workdir8 publishClient.workdir, 9 diffRun.diff_id AS stage_id 10 10 FROM publishRun 11 11 JOIN publishClient USING(client_id) … … 21 21 publishClient.product, 22 22 publishClient.stage, 23 camRun.cam_id AS stage_id,24 publishRun.workdir23 publishClient.workdir, 24 camRun.cam_id AS stage_id 25 25 FROM publishRun 26 26 JOIN publishClient USING(client_id) -
branches/pap_mops/ippTools/share/pxadmin_create_tables.sql
r24427 r24428 1376 1376 product VARCHAR(64), -- product name 1377 1377 stage VARCHAR(64) NOT NULL, -- stage of interest (chip, camera, diff, etc.) 1378 workdir VARCHAR(255) NOT NULL, -- working directory 1378 1379 comment VARCHAR(255), -- for human memory 1379 1380 PRIMARY KEY(client_id) … … 1385 1386 client_id BIGINT NOT NULL, -- link to publishClient 1386 1387 stage_id BIGINT NOT NULL, -- link to various stage tables 1387 workdir VARCHAR(255) NOT NULL, -- working directory1388 1388 label VARCHAR(64), -- label for run 1389 1389 state VARCHAR(64), -- state of run (new, full, etc.) -
branches/pap_mops/ippTools/src/pubtool.c
r24427 r24428 89 89 PXOPT_LOOKUP_STR(product, config->args, "-product", true, false); 90 90 PXOPT_LOOKUP_STR(stage, config->args, "-stage", true, false); 91 PXOPT_LOOKUP_STR(workdir, config->args, "-workdir", true, false); 91 92 92 93 // optional 93 94 PXOPT_LOOKUP_STR(comment, config->args, "-comment", false, false); 94 95 95 if (!publishClientInsert(config->dbh, 0, product, stage, comment)) {96 if (!publishClientInsert(config->dbh, 0, product, stage, workdir, comment)) { 96 97 psError(PS_ERR_UNKNOWN, false, "Database error"); 97 98 return false; … … 108 109 109 110 // required 110 PXOPT_LOOKUP_STR(workdir, config->args, "-workdir", true, false);111 111 112 112 // optional … … 171 171 psS64 stage = psMetadataLookupS64(NULL, row, "stage_id"); // Stage identifier 172 172 173 if (!publishRunInsert(config->dbh, 0, client, stage, workdir,set_label, "new")) {173 if (!publishRunInsert(config->dbh, 0, client, stage, set_label, "new")) { 174 174 psError(PS_ERR_UNKNOWN, false, "Unable to add fileset"); 175 175 psFree(output);
Note:
See TracChangeset
for help on using the changeset viewer.
