Revision d2e73c0c snf-cyclades-app/synnefo/logic/callbacks.py
b/snf-cyclades-app/synnefo/logic/callbacks.py | ||
---|---|---|
99 | 99 |
def wrapper(msg): |
100 | 100 |
try: |
101 | 101 |
network_id = utils.id_from_network_name(msg["network"]) |
102 |
network = Network.objects.get(id=network_id) |
|
102 |
network = Network.objects.select_for_update().get(id=network_id)
|
|
103 | 103 |
backend = Backend.objects.get(clustername=msg['cluster']) |
104 | 104 |
backend_network = BackendNetwork.objects.get(network=network, |
105 | 105 |
backend=backend) |
Also available in: Unified diff