From e802a6d570644ca1a907133628c1ca8e8350cd90 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sun, 21 Mar 2021 19:32:30 +0100 Subject: [PATCH] Tweak long-term-broken definition --- app/scripts/appListsHistory/script.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/scripts/appListsHistory/script.py b/app/scripts/appListsHistory/script.py index 8f31997..b3e07f1 100644 --- a/app/scripts/appListsHistory/script.py +++ b/app/scripts/appListsHistory/script.py @@ -139,7 +139,7 @@ def update_catalog_stats(app, history): return app_in_db.long_term_good_quality = len([d for d in history[-24:] if d["level"] > 5]) > 0.90 * 24 - app_in_db.long_term_broken = history[-1]["level"] == 0 and len([d for d in history[-24:] if d["level"] == 0]) > 12 + app_in_db.long_term_broken = history[-1]["level"] == 0 and len([d for d in history[-24:] if d["level"] >= 0 and d["level"] <= 2]) > 12 db.session.add(app_in_db)