diff options
| -rw-r--r-- | gunicorn_config.py | 18 | ||||
| -rw-r--r-- | pysite/constants.py | 1 | 
2 files changed, 18 insertions, 1 deletions
| diff --git a/gunicorn_config.py b/gunicorn_config.py index 6c9cf04a..c7d9dcd3 100644 --- a/gunicorn_config.py +++ b/gunicorn_config.py @@ -2,7 +2,10 @@ import re  from kombu import Connection -from pysite.constants import RMQ_HOST, RMQ_PASSWORD, RMQ_PORT, RMQ_USERNAME +from pysite.constants import ( +    BOT_EVENT_QUEUE, BotEventTypes, DEBUG_MODE, +    RMQ_HOST, RMQ_PASSWORD, RMQ_PORT, RMQ_USERNAME, +    CHANNEL_DEV_LOGS)  from pysite.migrations.runner import run_migrations  from pysite.queues import QUEUES @@ -46,3 +49,16 @@ def _when_ready(server=None, output_func=None):              for name, queue in QUEUES.items():                  queue.declare(channel=channel)                  output(f"Queue declared: {name}") + +            if not DEBUG_MODE: +                producer = c.Producer() +                producer.publish( +                    { +                        "event": BotEventTypes.send_embed, +                        "data": { +                            "target": CHANNEL_DEV_LOGS, +                            "title": "Site Deployment", +                            "message": "The site has been deployed!" +                        } +                    }, +                    routing_key=BOT_EVENT_QUEUE) diff --git a/pysite/constants.py b/pysite/constants.py index 5bdb025f..0099c946 100644 --- a/pysite/constants.py +++ b/pysite/constants.py @@ -128,3 +128,4 @@ RMQ_PORT = 5672  # Channels  CHANNEL_MOD_LOG = 282638479504965634 +CHANNEL_DEV_LOGS = 409308876241108992 | 
