change exchange
authorSofia Papagiannaki <papagian@gmail.com>
Mon, 12 Mar 2012 16:06:49 +0000 (18:06 +0200)
committerSofia Papagiannaki <papagian@gmail.com>
Mon, 12 Mar 2012 16:06:49 +0000 (18:06 +0200)
Refs: #1824

snf-astakos-app/README
snf-astakos-app/astakos/im/models.py

index e579e22..a529f10 100644 (file)
@@ -71,7 +71,7 @@ ASTAKOS_RECAPTCHA_OPTIONS           {'theme': 'white'}
 ASTAKOS_LOGOUT_NEXT                                                                                                 Where the user should be redirected after logout
                                                                                                                     (if not set and no next parameter is defined it renders login page with message)
 ASTAKOS_BILLING_FIELDS              ['id', 'is_active', 'provider', 'third_party_identifier']                       AstakosUser fields to propagate in the billing system
-ASTAKOS_QUEUE_CONNECTION                                                                                            The queue connection ex. 'rabbitmq://guest:guest@localhost:5672/astakos.userEvent.#'
+ASTAKOS_QUEUE_CONNECTION                                                                                            The queue connection ex. 'rabbitmq://guest:guest@localhost:5672/astakos'
                                                                                                                     (if it is not set, it does not send messages)
 ASTAKOS_RE_USER_EMAIL_PATTERNS      []                                                                              Email patterns that are automatically activated ex. ['^[a-zA-Z0-9\._-]+@grnet\.gr$']
 ==============================      =============================================================================   ===========================================================================================
index 3b7fa52..1c5cc3c 100644 (file)
@@ -171,6 +171,6 @@ def report_user_event(user):
         eventType = 'create' if not user.id else 'modify'
         body = UserEvent(QUEUE_CLIENT_ID, user, eventType, {}).format()
         conn = exchange_connect(QUEUE_CONNECTION)
-        routing_key = QUEUE_CONNECTION.replace('*', 'user')
+        routing_key = '%s.user' % QUEUE_CONNECTION
         exchange_send(conn, routing_key, body)
         exchange_close(conn)