Revision 73673127

b/snf-pithos-backend/pithos/backends/lib/rabbitmq/queue.py
44 44
        self.conn = exchange_connect(exchange)
45 45
        self.client_id = params['client_id']
46 46
    
47
    def send(self, message_key, user, resource, value, details):
48
        body = Receipt(self.client_id, user, resource, value, details).format()
47
    def send(self, message_key, user, instance, resource, value, details):
48
        body = Receipt(self.client_id, user, instance, resource, value, details).format()
49 49
        exchange_send(self.conn, message_key, body)
50 50
    
51 51
    def close(self):
b/snf-pithos-backend/pithos/backends/modular.py
79 79

  
80 80
QUEUE_MESSAGE_KEY_PREFIX = 'pithos.%s'
81 81
QUEUE_CLIENT_ID = 'pithos'
82
QUEUE_INSTANCE_ID = '1'
82 83

  
83 84
( CLUSTER_NORMAL, CLUSTER_HISTORY, CLUSTER_DELETED ) = range(3)
84 85

  
......
1010 1011
        account_node = self._lookup_account(account, True)[1]
1011 1012
        total = self._get_statistics(account_node)[1]
1012 1013
        details.update({'user': user, 'total': total})
1013
        self.messages.append((QUEUE_MESSAGE_KEY_PREFIX % ('resource.diskspace',), account, 'diskspace', size, details))
1014
        self.messages.append((QUEUE_MESSAGE_KEY_PREFIX % ('resource.diskspace',), account, QUEUE_INSTANCE_ID, 'diskspace', float(size), details))
1014 1015
    
1015 1016
    def _report_object_change(self, user, account, path, details={}):
1016 1017
        logger.debug("_report_object_change: %s %s %s %s", user, account, path, details)
1017 1018
        details.update({'user': user})
1018
        self.messages.append((QUEUE_MESSAGE_KEY_PREFIX % ('object',), account, 'object', path, details))
1019
        self.messages.append((QUEUE_MESSAGE_KEY_PREFIX % ('object',), account, QUEUE_INSTANCE_ID, 'object', path, details))
1019 1020
    
1020 1021
    # Policy functions.
1021 1022
    

Also available in: Unified diff