File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change 7
7
- Fill in check throughout the process to send previous steps infos in case of late crash [ #293 ] ( https://github.com/datagouv/hydra/pull/293 )
8
8
- Fix purge csv tables CLI by using the csv db connection [ #294 ] ( https://github.com/datagouv/hydra/pull/294 )
9
9
- Better gz files extraction function name [ #295 ] ( https://github.com/datagouv/hydra/pull/295 )
10
- - Add more detailed statuses [ #297 ] ( https://github.com/datagouv/hydra/pull/297 )
11
- - Handle cases of too long columns labels for postgres [ #298 ] ( https://github.com/datagouv/hydra/pull/298 )
12
- - Fix rare issue in ` /status/crawler/ ` endpoint [ #299 ] ( https://github.com/datagouv/hydra/pull/299 )
10
+ - Add more detailed statuses [ #298 ] ( https://github.com/datagouv/hydra/pull/298 )
11
+ - Handle cases of too long columns labels for postgres [ #299 ] ( https://github.com/datagouv/hydra/pull/299 )
12
+ - Fix rare issue in ` /status/crawler/ ` endpoint [ #301 ] ( https://github.com/datagouv/hydra/pull/301 ) [ # 302 ] ( https://github.com/datagouv/hydra/pull/302 )
13
13
14
14
## 2.3.0 (2025-07-15)
15
15
Original file line number Diff line number Diff line change @@ -36,8 +36,11 @@ async def get_crawler_status(request: web.Request) -> web.Response:
36
36
# all w/ a check, minus those with an outdated checked
37
37
count_fresh_checks : int = stats_resources ["count_checked" ] - stats_checks ["count_outdated" ]
38
38
total : int = stats_resources ["count_never_checked" ] + stats_resources ["count_checked" ]
39
- rate_checked : float = round (stats_resources ["count_checked" ] / total * 100 , 1 )
40
- rate_checked_fresh : float = round (count_fresh_checks / total * 100 , 1 )
39
+ if total > 0 :
40
+ rate_checked : float = round (stats_resources ["count_checked" ] / total * 100 , 1 )
41
+ rate_checked_fresh : float = round (count_fresh_checks / total * 100 , 1 )
42
+ else :
43
+ rate_checked , rate_checked_fresh = None , None
41
44
42
45
async def get_resources_status_counts (request : web .Request ) -> dict [str | None , int ]:
43
46
status_counts : dict = {status : 0 for status in Resource .STATUSES }
You can’t perform that action at this time.
0 commit comments