def clearQueue(self):
        """Clear the queue, but doesn't cancel the currently running commmand."""

        for cmd in self.queued:
            cmd.deferred.errback(failure.Failure(error.QueueCleared()))
        self.queued = []
        return defer.succeed(True)
Example #2
0
    def clearQueue(self):
        """Clear the queue."""

        for cmd in self.queued:
            cmd.deferred.errback(failure.Failure(error.QueueCleared()))
        self.queued = []
        return defer.succeed(True)