zenodo / zenodo-rdm

Zenodo, powered by InvenioRDM
https://zenodo.org
GNU General Public License v2.0
42 stars 25 forks source link

stats: ensure stats indices are per month and not per day #555

Closed ntarocco closed 11 months ago

psaiz commented 11 months ago

So, it looks like the default for the events is daily, and the default for the aggregated stats is monthly. Should we just change the default of the events for monthly as well?

diff --git a/invenio_stats/processors.py b/invenio_stats/processors.py
index befd4d6..e8d2845 100644
--- a/invenio_stats/processors.py
+++ b/invenio_stats/processors.py
@@ -141,7 +141,7 @@ class EventsIndexer(object):
         self,
         queue,
         prefix="events",
-        suffix="%Y-%m-%d",
+        suffix="%Y-%m",
         client=None,
         preprocessors=None,
         double_click_window=10,