aboutsummaryrefslogtreecommitdiffstats
path: root/pysite/constants.py
diff options
context:
space:
mode:
authorGravatar Gareth Coles <[email protected]>2018-05-30 22:38:54 +0100
committerGravatar GitHub <[email protected]>2018-05-30 22:38:54 +0100
commitaaa387a5b3bdb9bc416690dccef66196c76d373e (patch)
tree270900787f1f8d76a97279f277fb281d45f37859 /pysite/constants.py
parentAdd FAQ about LPTHW (diff)
RabbitMQ mixin, powered by Kombu (#84)
* [RMQ] Add Kombi an an RMQMixin, as well as some constants * [RMQ] Fix example in mixin docstring * Update Pipfile.lock - for some reason, pipenv didn't lock kombu
Diffstat (limited to 'pysite/constants.py')
-rw-r--r--pysite/constants.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/pysite/constants.py b/pysite/constants.py
index f95e076f..a9040751 100644
--- a/pysite/constants.py
+++ b/pysite/constants.py
@@ -17,6 +17,16 @@ class ValidationTypes(Enum):
params = "params"
+class BotEventTypes(Enum):
+ mod_log = "mod_log"
+
+ send_message = "send_message"
+ send_embed = "send_embed"
+
+ add_role = "ensure_role"
+ remove_role = "remove_role"
+
+
DEBUG_MODE = "FLASK_DEBUG" in environ
# All snowflakes should be strings as RethinkDB rounds them as ints
@@ -106,3 +116,14 @@ WIKI_AUDIT_WEBHOOK = environ.get("WIKI_AUDIT_WEBHOOK") or None
# Bot key
BOT_API_KEY = environ.get("BOT_API_KEY") or None
+
+# RabbitMQ settings
+BOT_EVENT_QUEUE = "bot_events"
+
+RMQ_USERNAME = environ.get("RABBITMQ_DEFAULT_USER") or "guest"
+RMQ_PASSWORD = environ.get("RABBITMQ_DEFAULT_PASS") or "guest"
+RMQ_HOST = "pdrmq" if not DEBUG_MODE else "localhost"
+RMQ_PORT = 5672
+
+# Channels
+CHANNEL_MOD_LOG = 282638479504965634