aptly-dev / aptly

aptly - Debian repository management tool
https://www.aptly.info/
MIT License
2.54k stars 369 forks source link

Shut down cleanly when 'api serve' is interrupted #1219

Closed refi64 closed 8 months ago

refi64 commented 9 months ago

This will properly close the db and, more particularly, flush out any profile files being written. Otherwise, they can end up empty or truncated.

codecov[bot] commented 9 months ago

Codecov Report

Merging #1219 (e1cc8cc) into master (18203c6) will increase coverage by 8.92%. Report is 5 commits behind head on master. The diff coverage is 93.75%.

@@            Coverage Diff             @@
##           master    #1219      +/-   ##
==========================================
+ Coverage   65.95%   74.87%   +8.92%     
==========================================
  Files         143      143              
  Lines       16192    16197       +5     
==========================================
+ Hits        10679    12128    +1449     
+ Misses       4760     3134    -1626     
- Partials      753      935     +182     
Files Coverage Δ
cmd/api_serve.go 71.08% <93.75%> (+38.65%) :arrow_up:

... and 32 files with indirect coverage changes

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

refi64 commented 9 months ago

Pushed a slightly cleaned up version.