'Run the next item in the work queue (a job waiting to run)'

def run_next(self):

    while True:
        (method, arg) = self.work_queue.get()
        if (method is STOP_SIGNAL):
            return
        try:
            if isinstance(arg, AsynchronousJobState):
                job_id = arg.job_wrapper.get_id_tag()
            else:
                job_id = arg.get_id_tag()
        except:
            job_id = 'unknown'
        try:
            name = method.__name__
        except:
            name = 'unknown'
        try:
            method(arg)
        except:
            log.exception(('(%s)    Unhandled    exception    calling    %s' % (job_id, name)))
