django-silk icon indicating copy to clipboard operation
django-silk copied to clipboard

Use Django 2.0 execute_wrapper()

Open SebCorbin opened this issue 2 years ago • 5 comments

SebCorbin avatar Nov 20 '22 18:11 SebCorbin

Codecov Report

Merging #631 (1d0d131) into master (5677fa8) will increase coverage by 0.43%. The diff coverage is 95.55%.

@@            Coverage Diff             @@
##           master     #631      +/-   ##
==========================================
+ Coverage   86.33%   86.77%   +0.43%     
==========================================
  Files          52       52              
  Lines        2093     2094       +1     
==========================================
+ Hits         1807     1817      +10     
+ Misses        286      277       -9     
Impacted Files Coverage Δ
silk/sql.py 92.53% <94.73%> (+13.74%) :arrow_up:
silk/apps.py 100.00% <100.00%> (ø)
silk/middleware.py 88.77% <100.00%> (-0.55%) :arrow_down:

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

codecov[bot] avatar Nov 20 '22 18:11 codecov[bot]

@SebCorbin Can you please give some details about this PR and its purpose? Thank you.

ulgens avatar Nov 20 '22 19:11 ulgens

@ulgens yes, see the related issue and last comment https://github.com/jazzband/django-silk/issues/214#issuecomment-1321204137

SebCorbin avatar Nov 20 '22 19:11 SebCorbin

After few days of real-world testing, the ready() method is not development-proof with the runserver command. I'll update this PR to switch to classic context manager on the middleware.

SebCorbin avatar Dec 14 '22 09:12 SebCorbin

Another option: rely on connection_created signal

SebCorbin avatar Jan 20 '23 09:01 SebCorbin