--- source-trees/gt2-cvs/gram/jobmanager/setup/program/globus-job-manager-script.in Wed Feb 27 16:26:45 2008 +++ source-trees/gt2-cvs/gram/jobmanager/setup/program/globus-job-manager-script.in Wed Feb 27 17:15:54 2008 @@ -36,6 +36,10 @@ use Globus::GRAM::Error; use Globus::GRAM::JobDescription; +eval "require Globus::GRAM::JobManagerGratia"; # Gratia patch to save DN/FQAN on submit +my $gratia_callout = $@?0:1; # Don't make the callout if the file is not there. + + my($manager_name, $argument_file, $command) = (undef, undef, undef); GetOptions('manager-name|m=s' => \$manager_name, @@ -106,6 +110,11 @@ else { $manager->respond($result); + + # Save cert information for Gratia accounting if appropriate. + if ($gratia_callout and ($command eq 'submit') and (exists $result->{JOB_ID})) { + Globus::GRAM::JobManagerGratia::gratia_save_cert_info($manager, $result->{JOB_ID}); + } } sub fail