Sometimes you need to update an instance of a model decorated with @publish, but you don't want a new message to be published on the broker.
An example, which may serve as a guideline to understand the motivation behind this new feature, would be updating the status of an order when it reaches its final stage:
order = Order.objects.get(order_id=order_id)
order.status = 'Confirmed'
order.save(stop=True)
In this example, by using stop=True when calling the save method, the message publication on the broker is halted, allowing the update of the order status without triggering a new publication message.
This pull request also incorporates the changes from the fix in pull request PR #42
Sometimes you need to update an instance of a model decorated with @publish, but you don't want a new message to be published on the broker.
An example, which may serve as a guideline to understand the motivation behind this new feature, would be updating the status of an order when it reaches its final stage:
In this example, by using
stop=True
when calling thesave
method, the message publication on the broker is halted, allowing the update of the order status without triggering a new publication message.This pull request also incorporates the changes from the fix in pull request PR #42