komuw / wiji

Wiji is an asyncio distributed task processor/queue.
MIT License
4 stars 1 forks source link

hook and ratelimiter should have access to queuing duration #56

Closed komuw closed 5 years ago

komuw commented 5 years ago

just as hook: https://github.com/komuw/wiji/blob/fe840537e329de41e6d309abdeb6737b050c6666/wiji/hook.py#L23
and ratelimiter: https://github.com/komuw/wiji/blob/ee8f3644a2320bbc27b2a6c9e95ece4f8ede5e26/wiji/ratelimiter.py#L42

have access to execution_duration; they should also have access to queuing_duration

This is because organisations may want to store those metrics and they may also want to change rate limits based on those as well.