def delete(self): import bonk.tasks ret = super(BonkTriggerMixin, self).delete() task = rethinkdb_lock.s(name='trigger_dns_dhcp_rebuild') | \ bonk.tasks.trigger_dns_dhcp_rebuild.si(self.instance) | \ rethinkdb_unlock.si(name='trigger_dns_dhcp_rebuild') task.apply_async() return ret
def update(self, instance, data): import bonk.tasks data = super(BonkTriggerMixin, self).update(instance, data) task = rethinkdb_lock.s(name='trigger_dns_dhcp_rebuild') | \ bonk.tasks.trigger_dns_dhcp_rebuild.si(data) | \ rethinkdb_unlock.si(name='trigger_dns_dhcp_rebuild') task.apply_async() return data