Skip to content

Commit

Permalink
feat(redis): update lock_ttl for batch_lock in redis_flusher
Browse files Browse the repository at this point in the history
- 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.
  • Loading branch information
atompie committed Jan 18, 2024
1 parent 96c0e85 commit 10e0d2a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tracardi/service/storage/redis/collections.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

0 comments on commit 10e0d2a

Please sign in to comment.