f7942d73fff5e5aab078c0e1654d9242f5245478,rasa/core/lock_store.py,RedisLockStore,__init__,#RedisLockStore#Any#Any#Any#Any#Any#Any#Any#,194
Before Change
socket_timeout=socket_timeout,
)
if not prefix:
self.prefix = "lock:"
elif isinstance(prefix, str) and prefix.isalnum():
self.prefix = prefix + ":lock:"
else:
self.prefix = "lock:"
logger.warning(
f"Omitting provided non-alphanumeric key prefix: "{prefix}"."
)
super().__init__()
def get_lock(self, conversation_id: Text) -> Optional[TicketLock]:
serialised_lock = self.red.get(self.prefix + conversation_id)
After Change
)
self.key_prefix = DEFAULT_REDIS_LOCK_STORE_KEY_PREFIX
if key_prefix:
logger.debug(f"Setting non-default redis key prefix: "{key_prefix}".")
self._set_key_prefix(key_prefix)
super().__init__()
def _set_key_prefix(self, key_prefix: Text) -> None:
if isinstance(key_prefix, str) and key_prefix.isalnum():
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 6
Instances
Project Name: RasaHQ/rasa
Commit Name: f7942d73fff5e5aab078c0e1654d9242f5245478
Time: 2020-10-29
Author: bbarnes@gmail.com
File Name: rasa/core/lock_store.py
Class Name: RedisLockStore
Method Name: __init__
Project Name: RasaHQ/rasa
Commit Name: f7942d73fff5e5aab078c0e1654d9242f5245478
Time: 2020-10-29
Author: bbarnes@gmail.com
File Name: rasa/core/tracker_store.py
Class Name: RedisTrackerStore
Method Name: __init__
Project Name: ray-project/ray
Commit Name: a9ea139317c39cde13f82eb2034fe561fa8bc196
Time: 2020-04-16
Author: rliaw@berkeley.edu
File Name: python/ray/util/sgd/torch/torch_runner.py
Class Name: TorchRunner
Method Name: _initialize_dataloaders