ryanhiebert / hirefire

A Python lib to integrate with the HireFire service -- The Heroku Proccess Manager.
https://hirefire.readthedocs.io/
Other
34 stars 21 forks source link

Output request queue time for Django #55

Closed OldSneerJaw closed 4 years ago

OldSneerJaw commented 5 years ago

HireFire includes a strategy for scaling web dynos based on Heroku request queue times. This change adds a second Django middleware with support for queue time scaling adhering to the official docs: https://help.hirefire.io/article/49-logplex-queue-time. I've verified that it works correctly end-to-end as a dependency in a WIP branch of a production application (closed source, so I can't link to it).

codecov[bot] commented 5 years ago

Codecov Report

Merging #55 into master will increase coverage by 1.02%. The diff coverage is 85.71%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #55      +/-   ##
==========================================
+ Coverage   54.63%   55.66%   +1.02%     
==========================================
  Files          11       11              
  Lines         410      424      +14     
==========================================
+ Hits          224      236      +12     
- Misses        186      188       +2
Impacted Files Coverage Δ
hirefire/contrib/django/middleware.py 90.56% <85.71%> (-1.75%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update cf8686d...241a0cc. Read the comment docs.

OldSneerJaw commented 5 years ago

This is neat. I don't use the HireFire service anymore for my projects (though I do still use this package to get metrics), but this seems like a cool way to scale the web dynos.

Are you up for maintaining the code in this PR for this package? I don't plan on using it, so I won't easily be able to tell if something's not working with it.

Sure, I can look after this code. I don't expect it will evolve much, if at all, but I will be using it in production, so I don't mind.