[gold-users] API Question

Scott Jackson scottmo at clusterresources.com
Tue Apr 28 10:54:43 MDT 2009


Kevin Van Workum wrote:
> Figured it out after looking at Request.pm:
>
> for my $user (@users) {
>    $request->setCondition("User, $user, ,"Match", "Or");
> }
>
>

Close, but I would replace "Match" with "EQ" above, unless you want "al" 
to match marshall, and alyson, etc.

Also, refer to my previous email on the Grouping piece, since the above 
could be problematic if the prior condition were say a project. Without 
proper parenthesizing you might effectively be asking for either the 
specified project OR one of the specified users instead of the specified 
project AND one of the specified users.

Scott
>
> On Tue, Apr 28, 2009 at 9:44 AM, Kevin Van Workum <vanw at tticluster.com 
> <mailto:vanw at tticluster.com>> wrote:
>
>     Hi,
>
>     I'm writing a perl script to expand the functionality of glsjob
>     for my users. I'd like to be able to list the jobs for more than
>     one user, e.g. glsjob -u mike -u bob. To get a single user I can do:
>
>     $request->setCondition("User", $user);
>
>     but how do I do the equivalent of:
>
>     goldsh Job Query User==mike || User==bob
>
>     using the API?
>
>     Something like this maybe:
>
>     for my $user (@users) {
>        $request->setCondition("User, $user, "OR");
>     }
>
>
>
>     -- 
>     Kevin Van Workum, Ph.D.
>
>
>
>
> -- 
> Kevin Van Workum, Ph.D.
> Tsunamic Technologies Inc.
> Vice President
> www.ClusterOnDemand.com <http://www.ClusterOnDemand.com>
> 877-492-8027 x11
> ONLINE COMPUTER CLUSTERS
> ------------------------------------------------------------------------
>
> _______________________________________________
> gold-users mailing list
> gold-users at supercluster.org
> http://www.supercluster.org/mailman/listinfo/gold-users
>   



More information about the gold-users mailing list