Skip to content

Instantly share code, notes, and snippets.

@juan-ignacio-sanchez
Last active September 2, 2021 18:52
Show Gist options
  • Select an option

  • Save juan-ignacio-sanchez/8b12355e335e5a931c94880f822d8e96 to your computer and use it in GitHub Desktop.

Select an option

Save juan-ignacio-sanchez/8b12355e335e5a931c94880f822d8e96 to your computer and use it in GitHub Desktop.
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