[odrs-web/oscp] Disable stats collection



commit c1e995ed8a50cbbb3fa0a0e30e268baaddacf5f0
Author: Richard Hughes <richard hughsie com>
Date:   Mon Jul 1 14:50:48 2019 +0100

    Disable stats collection

 app_data/odrs/views_api.py | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/app_data/odrs/views_api.py b/app_data/odrs/views_api.py
index 8ca5311..9cb8172 100644
--- a/app_data/odrs/views_api.py
+++ b/app_data/odrs/views_api.py
@@ -177,12 +177,12 @@ def api_fetch():
     # increments the fetch count on one specific application
     datestr = _get_datestr_from_dt(datetime.date.today())
     stmt = insert(Analytic).values(datestr=datestr, app_id=item['app_id'])
-    if db.session.bind.dialect.name != 'sqlite': # pylint: disable=no-member
-        stmt_ondupe = stmt.on_duplicate_key_update(datestr=stmt.inserted.datestr,
-                                                   app_id=stmt.inserted.app_id,
-                                                   fetch_cnt=stmt.inserted.fetch_cnt + 1)
-    else:
-        stmt_ondupe = stmt
+#    if db.session.bind.dialect.name != 'sqlite': # pylint: disable=no-member
+#        stmt_ondupe = stmt.on_duplicate_key_update(datestr=stmt.inserted.datestr,
+#                                                   app_id=stmt.inserted.app_id,
+#                                                   fetch_cnt=stmt.inserted.fetch_cnt + 1)
+#    else:
+    stmt_ondupe = stmt
     db.session.execute(stmt_ondupe) # pylint: disable=no-member
 
     # also add any compat IDs


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]