pyronear / pyro-api

Alert Management API for wildfire prevention, detection & monitoring. Built with FastAPI & PostgreSQL
Apache License 2.0
21 stars 9 forks source link

refactor: change alert relaxation from 5 to 30 minutes #269

Closed blenzi closed 1 year ago

blenzi commented 1 year ago

When a device issues multiple alerts, it is associated to an existing event if it is within "relaxation time". This PR increases the relaxation time from 5 to 30 minutes to avoid creating multiple events for the same fire detection. The risk to miss another fire within the relaxation time is considered small at this point.

ghost commented 1 year ago

Nice of you to open a PR :pray: When you're ready and want to get it reviewed, post a comment in this Pull Request with this message: /quack review

codecov[bot] commented 1 year ago

Codecov Report

Merging #269 (35ffe7f) into main (14f3895) will decrease coverage by 4.93%. The diff coverage is 100.00%.

@@             Coverage Diff             @@
##              main     #269      +/-   ##
===========================================
- Coverage   100.00%   95.07%   -4.93%     
===========================================
  Files            3       60      +57     
  Lines           72     1420    +1348     
===========================================
+ Hits            72     1350    +1278     
- Misses           0       70      +70     
Flag Coverage Δ
client 100.00% <ø> (ø)
unittests 94.80% <100.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
src/app/api/crud/alerts.py 100.00% <ø> (ø)
src/app/config.py 96.87% <100.00%> (ø)

... and 55 files with indirect coverage changes