It's using the python stdlib logging library. You can add a handler to that 
logger that sends emails or does anything else. It really depends on how you're 
running your processes how to setup logging properly but in Pyramid (which uses 
logging.config.fileConfig) it would be done by adding another section to your 
ini file to catch the "waitress.queue" logger.

[loggers]
keys = ..., waitress_queue

[handlers]
keys = ..., waitress_queue

[logger_waitress_queue]
handlers = waitress_queue
qualname = waitress.queue

[handler_waitress_queue]
class = handlers.SMTPHandler
args = (('example.com', 578, 'f...@example.com', ['t...@example.com'], 'queue 
depth warning', ('username', 'password'))
formatter = generic

- Michael

> On May 21, 2021, at 15:51, jdavi...@gmail.com <jdavis....@gmail.com> wrote:
> 
> I understand the cause of the warning, I just wonder if there's a way to hook 
> into the process that triggers it to allow it to send a warning email or 
> something when the queue depth reaches a certain threshold? 
> 
> Alternatively is there a way to query it to see what the queue depth is 
> currently?
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "pylons-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to pylons-discuss+unsubscr...@googlegroups.com 
> <mailto:pylons-discuss+unsubscr...@googlegroups.com>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/pylons-discuss/d65251f9-61b4-4551-9c3b-761c193074f8n%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/pylons-discuss/d65251f9-61b4-4551-9c3b-761c193074f8n%40googlegroups.com?utm_medium=email&utm_source=footer>.

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pylons-discuss+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pylons-discuss/0297A2C3-93D4-4389-B09E-0AE1C2D4DF5C%40gmail.com.

Reply via email to