def add_policy(self, policy):
        if isinstance(policy, QueuePolicy):
            self.queue_policies.append(policy)
        else:
            raise TypeError('Argument not a QueuePolicy.')
Adds a |QueuePolicy| to be executed before messages are persisted
dataset/ETHPy150Open slimta/python-slimta/slimta/queue/__init__.py/Queue.add_policy