Hi Reuti and Ed,

Ed - It worked when I used the following code snippet.  I'm wondering if I
can further simplify the code.  Any tips are appreciated.

   if (exists $params{l_hard}) {
      if (exists $params{l_hard}{exclusive}) {
         # check if the user is in the allowed list
         # otherwise reject the job
         if (!exists $llexcl_users{$username}) {
            # Check out if the queue name is "db"
            while (my ($queue, $v) = each %{$params{q_hard}}) {
               if ($queue eq 'db') {
                  # set exclusive for the job submitted to the db queue
                  $exclusive = 1;
                  last;
               }
            }
            if ($exclusive eq 1) {
               # Allow exclusive jobs on the db queue
               my $str = 'User ' . $username . ' have a permission to run
an exclusive job on the db queue.';
               jsv_accept($str);
               return;
            } else {
               my $str = 'User ' . $username . ' does not have a permission
to run an exclusive job.';
               jsv_reject($str);
               return;
            }
         }
      }
   }


Reuti - Yes, I have more than one queues per exechost.

Thanks,
- Chansup



On Tue, Jun 11, 2013 at 2:44 PM, Reuti <[email protected]> wrote:

> Hi,
>
> Am 11.06.2013 um 19:41 schrieb CB:
>
> > I'm looking for a tip on how to extract queue name from the jsv script,
> especially the perl script version, located at the util/resources/jsv
> directory.   I'm currently running OGS/GE 2011.11.
> >
> > I want to disable exclusive jobs for all queues except a special queue.
> > so when a job submitted to the special queue, I like to grant the
> exclusive job.
>
> Do you have more than one queue per exechost? If not, the exclusive
> complex could also be attached on a queue level. And when it's forced, the
> request for the exclusive complex would route the job to the correct queue
> too.
>
> -- Reuti
>
>
> > But I don't know how the get the queue name where a job is submitted to.
> >
> > Any suggestion is appreciated.
> >
> > Thanks,
> > - chansup
> >
> > _______________________________________________
> > users mailing list
> > [email protected]
> > https://gridengine.org/mailman/listinfo/users
>
>
_______________________________________________
users mailing list
[email protected]
https://gridengine.org/mailman/listinfo/users

Reply via email to