From 10e0d2aa2557154d5f383d85f037e259bb668612 Mon Sep 17 00:00:00 2001 From: risto Date: Thu, 18 Jan 2024 10:33:13 +0100 Subject: [PATCH] feat(redis): update lock_ttl for batch_lock in redis_flusher - Update the lock_ttl for the batch_lock in the redis_flusher module. - Set the default_lock_ttl to 5 minutes instead of 30 minutes. - This change ensures that the lock is released sooner, improving performance. Refactor: update lock_flusher key in collections.py - Update the lock_flusher key in the collections.py file. - Remove the lock_flusher key from the lock_persister key. - This change improves code organization and separation of concerns. --- tracardi/service/storage/redis/collections.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tracardi/service/storage/redis/collections.py b/tracardi/service/storage/redis/collections.py index cf4c596d5..197cefa08 100644 --- a/tracardi/service/storage/redis/collections.py +++ b/tracardi/service/storage/redis/collections.py @@ -17,7 +17,7 @@ class Collection: profile: str = "profile:" # HASH session: str = "session:" # HASH lock_tracker: str = "lock:tracker:" # HASH - lock_persister: str = "lock:persister:" # HASH + session_lock: str = "session:lock:" # HASH profile_fields: str = "profile:fields" # SET, Cache profile fields, properties for auto completion event_fields: str = "event:fields" # SET, Cache event fields, properties for auto completion @@ -28,4 +28,6 @@ class Collection: browser_finger_print: str = 'profile:finger:browser' # Cache for profile by browser fingerprint function_cache: str = 'function' + lock_flusher: str = "lock:flusher:" # HASH + lock_persister: str = "lock:persister:" # HASH