Esempio n. 1
0
def entry_index(request, entry_id):
    """
    Detail page on a specific blackboard entry.
    """
    # Load the template.
    t = loader.get_template('monitor/detail.html')

    # Get the bb entries.
    entry = blackboard.getEntry(entry_id)

    # Render the template and exit.
    c = Context({'entry': entry, })
    return(HttpResponse(t.render(c)))
Esempio n. 2
0
File: owld.py Progetto: fpierfed/owl
    def owlapi_jobs_get_info(self, job_id=None):
        """
        Return all info about the given blackboard entry (identified by its
        GlobalJobId `job_id`) as a Python dictionary.

        Usage
            jobs_get_info(job_id)

        Return
            the given blackboard entry as a dictionay.
        """
        if(job_id is None):
            return

        try:
            entry = blackboard.getEntry(job_id)
        except:
            entry = None
        if(not entry):
            return
        return(entry.todict())
Esempio n. 3
0
    def owlapi_jobs_get_info(self, job_id=None):
        """
        Return all info about the given blackboard entry (identified by its
        GlobalJobId `job_id`) as a Python dictionary.

        Usage
            jobs_get_info(job_id)

        Return
            the given blackboard entry as a dictionay.
        """
        if (job_id is None):
            return

        try:
            entry = blackboard.getEntry(job_id)
        except:
            entry = None
        if (not entry):
            return
        return (entry.todict())
Esempio n. 4
0
def create_blackboard_entry(job_ad, logger=None):
    """
    Create a new Blackboard entry from `job_ad`. In case a Blackboard entry with
    the same GlobalJobId already exists (which would happen e.g. in a rescue
    DAG), fallback to an update.
    """
    from owl.classad import Job
    from owl import blackboard

    # Now, we could be in a rescue DAG, meaning that the blackboard entry might
    # already be there. If this is the case, we just update that entry and not
    # create a new one.
    entry = None
    job = Job.new_from_classad(job_ad)
    try:
        entry = blackboard.getEntry(entryId=job.GlobalJobId)
    except:
        pass

    if (entry):
        update_blackboard_entry(job_ad, logger)
    else:
        blackboard.createEntry(job)
    return
Esempio n. 5
0
def create_blackboard_entry(job_ad, logger=None):
    """
    Create a new Blackboard entry from `job_ad`. In case a Blackboard entry with
    the same GlobalJobId already exists (which would happen e.g. in a rescue
    DAG), fallback to an update.
    """
    from owl.classad import Job
    from owl import blackboard

    # Now, we could be in a rescue DAG, meaning that the blackboard entry might
    # already be there. If this is the case, we just update that entry and not
    # create a new one.
    entry = None
    job = Job.new_from_classad(job_ad)
    try:
        entry = blackboard.getEntry(entryId=job.GlobalJobId)
    except:
        pass

    if(entry):
        update_blackboard_entry(job_ad, logger)
    else:
        blackboard.createEntry(job)
    return