check_send_receive: Use different users for staging and prod.

(imported from commit 26aad66bf4b0bdd0d52693f42f6fc1ad1471f948)
This commit is contained in:
Tim Abbott 2013-04-16 15:23:32 -04:00
parent ea57a5151c
commit a07df5fb17

View file

@ -87,20 +87,29 @@ def get_humbug(recipient, max_message_id):
report("CRITICAL", "Error receiving Humbugs, args were: %s, %s" % (max_message_id, result)) report("CRITICAL", "Error receiving Humbugs, args were: %s, %s" % (max_message_id, result))
return result['messages'] return result['messages']
# hamlet and othello are default users if options.site == "staging.humbughq.com":
# hamlet and othello are default users on staging
sender = "hamlet@humbughq.com" sender = "hamlet@humbughq.com"
sender_key = "dfe1c934d555f4b9538d0d4cfd3069c2"
recipient = "othello@humbughq.com" recipient = "othello@humbughq.com"
recipient_key = "4e5d97591bec64bf57d2698ffbb563e3"
else:
# cordelia and iago are default users on prod
sender = "iago@humbughq.com"
sender_key = "d43b53c27a8106195b46781abc67901a"
recipient = "cordelia@humbughq.com"
recipient_key = "24cf18de98d5c31da9c6c79f0cbec195"
humbug_sender = humbug.Client( humbug_sender = humbug.Client(
email=sender, email=sender,
api_key="dfe1c934d555f4b9538d0d4cfd3069c2", api_key=sender_key,
verbose=True, verbose=True,
client="test: Humbug API", client="test: Humbug API",
site=options.site) site=options.site)
humbug_recipient = humbug.Client( humbug_recipient = humbug.Client(
email=recipient, email=recipient,
api_key="4e5d97591bec64bf57d2698ffbb563e3", api_key=recipient_key,
verbose=True, verbose=True,
client="test: Humbug API", client="test: Humbug API",
site=options.site) site=options.site)