diff --git a/inventory_provider/tasks/worker.py b/inventory_provider/tasks/worker.py
index 0cd6fcdb1cc02ccf22b16628be7090f658621eaa..a013915c628020ba496d891d3b528b8a894493c6 100644
--- a/inventory_provider/tasks/worker.py
+++ b/inventory_provider/tasks/worker.py
@@ -440,6 +440,13 @@ def _derive_router_hostnames(config):
 
 
 def _erase_next_db(config):
+    """
+    flush next db, but first save latch and then restore afterwards
+
+    TODO: handle the no latch scenario nicely
+    :param config:
+    :return:
+    """
     r = get_next_redis(config)
     saved_latch = get_latch(r)
     r.flushdb()
@@ -449,6 +456,7 @@ def _erase_next_db(config):
             new_current=saved_latch['current'],
             new_next=saved_latch['next'])
 
+
 def launch_refresh_cache_all(config):
     """
     utility function intended to be called outside of the worker process