XX - get uncommitted file
XX - get file with different credentials
XX - upload again comitted file
+
+
+
+
+
+Register feed
+
+$ jpps-test FeedIndex
+
+registers predefined feed, seen in database (table feeds), slaves should
+restart
+
+
+
+Batch feed
+
+$ jpps-test FeedIndex yes
" RecordTag jobid tagname stringvalue\n"
" GetJobFiles jobid\n"
" GetJobAttr jobid attr\n"
- " FeedIndex \n"
+ " FeedIndex [yes (history)]\n"
" FeedIndexRefresh feedid\n"
,me);
};
struct _jpelem__FeedIndexResponse out;
+ in.history = argc >= 3 && !strcasecmp(argv[2],"yes");
+
if (!check_fault(soap,soap_call___jpsrv__FeedIndex(soap,server,"",&in,&out)))
{
printf("FeedId: %s\nExpires: %s\n",out.feedId,ctime(&out.feedExpires));
void jpfeed_free(struct jpfeed *f)
{
- /* TODO */
- abort();
+ int i;
+
+ assert(f->njobs == 0); /* XXX: we shouldn't do this */
+
+ free(f->id);
+ free(f->destination);
+ if (f->attrs) {
+ for (i=0; f->attrs[i]; i++) free(f->attrs[i]);
+ free(f->attrs);
+ }
+ for (i=0; i<f->nmeta_attr; i++) free(f->meta_attr[i]);
+ free(f->meta_attr);
+ for (i=0; i<f->nother_attr; i++) free(f->other_attr[i]);
+ free(f->other_attr);
+
+ if (f->qry) {
+ for (i=0; f->qry[i].attr; i++) glite_jp_free_query_rec(f->qry+i);
+ free(f->qry);
+ }
+
+ for (i=0; i<f->nmeta_qry; i++) glite_jp_free_query_rec(f->meta_qry+i);
+ free(f->meta_qry);
+ for (i=0; i<f->nother_qry; i++) glite_jp_free_query_rec(f->other_qry+i);
+ free(f->other_qry);
+
+ /* XXX: no next */
+
+ free(f);
}
static int drain_feed(glite_jp_context_t ctx, struct jpfeed *f)
glite_jp_clear_error(ctx);
/* count "meta" attributes */
cnt = 0;
- for (i=0; f->attrs[i]; f++)
+ for (i=0; f->attrs[i]; i++)
if (glite_jppsbe_is_metadata(ctx,f->attrs[i])) cnt++;
f->meta_attr = cnt ? malloc((cnt+1) * sizeof *f->meta_attr) : NULL;
case 3: cols = "j.dg_jobid,u.cert_subj,j.reg_time"; break;
}
- trio_asprintf(stmt,"select %s from jobs j%s where %s",
+ trio_asprintf(&stmt,"select %s from jobs j%s where %s %s",
cols,
- quser ? ",u.users" : "",
- where);
+ quser ? ",users u" : "",
+ where,
+ cmask & 1 ? "and u.userid = j.owner" : "");
if (glite_jp_db_execstmt(ctx,stmt,&q) <= 0) {
err.code = EIO;