From 8c046602127fb5e69d66a8f25ca53173357f2402 Mon Sep 17 00:00:00 2001 From: joamag Date: Thu, 28 Sep 2017 15:28:34 +0100 Subject: [PATCH] new comment added --- src/budy/bots/omni_bot.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/budy/bots/omni_bot.py b/src/budy/bots/omni_bot.py index bf13cad7..ad6a7821 100644 --- a/src/budy/bots/omni_bot.py +++ b/src/budy/bots/omni_bot.py @@ -183,6 +183,9 @@ def gc_measurements_db(self): "Running GC for %d measurements in database ..." % len(measurements) ) + # sorts the measurements (product dimensions) according to the + # modified data, from latest to oldest to be able to iterate + # over them to remove possible duplication from the database measurements.sort( key = lambda v: v.meta.get("modify_date", 0), reverse = True