Determines if the queue is locked.

def locked(self):
        """ Determines if the queue is locked. """
        if len(self.failed) == 0:
            return False
        for fail in self.failed:
            for job in self.active_jobs:
                if fail.alias in job.depends_on:
                    return True