Last active
September 2, 2021 18:52
-
-
Save juan-ignacio-sanchez/8b12355e335e5a931c94880f822d8e96 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from logging.handlers import QueueListener | |
| from django.conf import settings | |
| def start_queue_listener(): | |
| alerts_queue_listener = QueueListener( | |
| settings.SLACK_QUEUE, | |
| SlackHandler(), # Notice that this needs to be an instance. | |
| respect_handler_level=True | |
| ) | |
| alerts_queue_listener.start() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment