achimnol / aiotools

Idiomatic asyncio utilties
https://aiotools.readthedocs.io
MIT License
153 stars 11 forks source link

feat: Expose `process_index` context variable for server processes #31

Closed achimnol closed 2 years ago

achimnol commented 2 years ago

This PR adds a context variable process_idex to the aiotools.server module so that the worker processes could read the index of current process anywhere.

codecov[bot] commented 2 years ago

Codecov Report

Merging #31 (1213aa3) into main (3a65b38) will decrease coverage by 0.12%. The diff coverage is 71.42%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #31      +/-   ##
==========================================
- Coverage   77.38%   77.26%   -0.13%     
==========================================
  Files          10       10              
  Lines         849      862      +13     
==========================================
+ Hits          657      666       +9     
- Misses        192      196       +4     
Impacted Files Coverage Δ
src/aiotools/server.py 50.17% <71.42%> (+0.90%) :arrow_up:

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 3a65b38...1213aa3. Read the comment docs.