" -t,--to URI\n"
" [ -s,--source lb-source ] (default LRMS)\n"
" [ -c,--sequence lb-seqcode ]\n"
+ " [ -n,--subjobs n]\n"
,me);
}
{ "to",1,NULL,'t' },
{ "source",1,NULL,'s' },
{ "sequence",1,NULL,'c' },
+ { "subjobs",1,NULL,'n' },
};
char *jobid_s = NULL, *ftjobid_s = NULL, *from = NULL, *to = NULL, *source_s = "LRMS",
*sequence = NULL, *srv, *uniq, type_c = 'x';
unsigned int port;
- int o;
+ int o, i;
+ unsigned int nsubjobs = 0;
- glite_jobid_t jobid, ftjobid;
+ glite_jobid_t jobid, ftjobid, *subjobs;
edg_wll_Source source;
enum edg_wll_SandboxSandbox_type type =
edg_wll_Context ctx;
- while ((o = getopt_long(argc,argv,"j:iof:t:s:c:",opts,NULL)) != EOF) switch(o) {
+ while ((o = getopt_long(argc,argv,"j:iof:t:s:c:n:",opts,NULL)) != EOF) switch(o) {
case 'j': jobid_s = optarg; break;
case 'i': if (type != EDG_WLL_SANDBOX_SANDBOX_TYPE_UNDEFINED) { usage(argv[0]); exit(1); }
type = EDG_WLL_SANDBOX_INPUT;
case 't': to = optarg; break;
case 's': source_s = optarg; break;
case 'c': sequence = optarg; break;
+ case 'n': nsubjobs = atoi(optarg); break;
default: usage(argv[0]); exit(1);
}
check_log(edg_wll_RegisterJob,ftjobid_s,(
ctx,
- ftjobid, EDG_WLL_REGJOB_FILE_TRANSFER,
+ ftjobid, (nsubjobs==0) ? EDG_WLL_REGJOB_FILE_TRANSFER : EDG_WLL_REGJOB_FILE_TRANSFER_COLLECTION,
"n/a","n/a",
- 0,NULL,NULL));
-
- check_log(edg_wll_LogFileTransferRegister,ftjobid_s,(ctx,from,to));
+ nsubjobs,NULL,&subjobs));
+
+ if (nsubjobs == 0) {
+ check_log(edg_wll_LogFileTransferRegister,ftjobid_s,(ctx,from,to));
+ }
+ else {
+ check_log(edg_wll_LogFileTransferRegister,ftjobid_s,(ctx,"n/a","n/a"));
+ }
+
check_log(edg_wll_LogSandbox,ftjobid_s,(
ctx,
edg_wll_SandboxSandbox_typeToString(type),
printf("GLITE_WMS_SEQUENCE_CODE=\"%s\"\n",edg_wll_GetSequenceCode(ctx));
+ if (nsubjobs){
+ for (i = 0; i < nsubjobs; i++){
+ char *ftsubjobid_s = edg_wlc_JobIdUnparse(subjobs[i]);
+ printf("EDG_WL_SUB_JOBID[%d]=\"%s\"\n", i, ftsubjobid_s);
+ free(ftsubjobid_s);
+ }
+
+ edg_wll_SetLoggingJob(ctx,ftjobid,NULL,EDG_WLL_SEQ_NORMAL);
+ check_log(edg_wll_RegisterFTSubjobs, ftjobid_s, (
+ ctx,
+ ftjobid,
+ "NS",
+ nsubjobs, subjobs
+ ));
+
+ for (i=0; subjobs[i]; i++) {
+ char *ftsubjobid_s = edg_wlc_JobIdUnparse(subjobs[i]);
+ edg_wll_SetLoggingJob(ctx, subjobs[i], NULL, EDG_WLL_SEQ_NORMAL);
+ check_log(edg_wll_LogFileTransferRegister, ftsubjobid_s,(
+ ctx, from, to
+ ));
+ check_log(edg_wll_LogSandbox, ftsubjobid_s, (
+ ctx,
+ edg_wll_SandboxSandbox_typeToString(type),
+ NULL,
+ jobid_s
+ ));
+ free(ftsubjobid_s);
+ }
+ }
+
return 0;
}