diff --git a/src/neptune_scale/api/attribute.py b/src/neptune_scale/api/attribute.py index 144387d..e3dbbf7 100644 --- a/src/neptune_scale/api/attribute.py +++ b/src/neptune_scale/api/attribute.py @@ -95,6 +95,8 @@ def log( elif isinstance(timestamp, (float, int)): timestamp = datetime.fromtimestamp(timestamp) + # MetadataSplitter is an iterator, so gather everything into a list instead of iterating over + # it in the critical section, to avoid holding the lock for too long. # TODO: Move splitting into the worker process. Here we should just send messages as they are. chunks = list( MetadataSplitter(