Пример #1
0
def hold_job(request, job_id):
    """
    Send the gven job_id a condor_hold. Then redirect to the main index page.
    """
    # Call condor_hold job_id
    err = condorutils.condor_hold(job_id)

    # Redirect to the main index.
    return(HttpResponseRedirect(reverse('monitor.views.index')))
Пример #2
0
    def owlapi_jobs_suspend(self, job_id=None, owner=None,
                            timeout=condor.TIMEOUT):
        """
        Suspend the job corresponding to the given GlobalJobId `job_id` (if not
        None) or all the jobs of the given `owner` (if not None). It is
        important to notice that `jobs_id` and `owner` are mutually exclusive
        and `job_id` has precendence. Return condor_hold exit code.

        Usage
            jobs_suspend(job_id=None, owner=None)

        Return
            0: success
            255: both `job_id` and `owner` are None
            254 if job_id is not a valid Condor (local or global) job ID
            otherwise: error condition (the same returned by condor_hold)
        """
        return(condor.condor_hold(job_id=job_id, owner=owner, timeout=timeout))
Пример #3
0
    def owlapi_jobs_suspend(self,
                            job_id=None,
                            owner=None,
                            timeout=condor.TIMEOUT):
        """
        Suspend the job corresponding to the given GlobalJobId `job_id` (if not
        None) or all the jobs of the given `owner` (if not None). It is
        important to notice that `jobs_id` and `owner` are mutually exclusive
        and `job_id` has precendence. Return condor_hold exit code.

        Usage
            jobs_suspend(job_id=None, owner=None)

        Return
            0: success
            255: both `job_id` and `owner` are None
            254 if job_id is not a valid Condor (local or global) job ID
            otherwise: error condition (the same returned by condor_hold)
        """
        return (condor.condor_hold(job_id=job_id, owner=owner,
                                   timeout=timeout))