[gold-users] API Question

Scott Jackson scottmo at clusterresources.com
Tue Apr 28 10:58:15 MDT 2009


Kevin Van Workum wrote:
> OK, now how do I group Conditions? I'd like to do something like:
>
> (User==mike || User==bob) && (EndTime>=2009-04-01 && EndTime<=2009-05-01)
>
> Kevin
$request->setCondition("User, "mike", "EQ", "And", "+1");
$request->setCondition("User, "bob", "EQ", "Or", "-1");
$request->setCondition("EndTime, "2009-04-01", "GE", "And", "+1");
$request->setCondition("EndTime, "2009-05-01", "LE", "And", "-1");

Thanks,

Scott

>
> On Tue, Apr 28, 2009 at 10:15 AM, Kevin Van Workum 
> <vanw at tticluster.com <mailto:vanw at tticluster.com>> wrote:
>
>     Figured it out after looking at Request.pm:
>
>     for my $user (@users) {
>        $request->setCondition("User, $user, ,"Match", "Or");
>
>     }
>
>
>
>     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
>
>
>
>
> -- 
> 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