mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-04-07 11:28:09 +02:00
k
This commit is contained in:
parent
dd26f92206
commit
b4e975013c
@ -723,20 +723,6 @@ def monitor_vespa_sync(self: Task, tenant_id: str | None) -> bool:
|
||||
a.connector_credential_pair_id, a.search_settings_id
|
||||
)
|
||||
failure_reason = f"Unknown index attempt {a.id}. Might be left over from a process restart."
|
||||
# Log all the things that exist in Redis
|
||||
logger.notice("Logging all keys in Redis:")
|
||||
for key in r.scan_iter("*"):
|
||||
key_str = key.decode("utf-8")
|
||||
logger.notice(f"Key: {key_str}")
|
||||
# key_type = r.type(key).decode('utf-8')
|
||||
# logger.notice(f"Key: {key_str}, Type: {key_type}")
|
||||
|
||||
# Log specific details about the indexing attempt
|
||||
logger.notice(f"Indexing attempt {a.id} details:")
|
||||
logger.notice(f" fence_key: {rci.fence_key}")
|
||||
logger.notice(f" generator_complete_key: {rci.generator_complete_key}")
|
||||
logger.notice(f" generator_progress_key: {rci.generator_progress_key}")
|
||||
logger.notice(f" taskset_key: {rci.taskset_key}")
|
||||
if not r.exists(rci.fence_key):
|
||||
mark_attempt_failed(a, db_session, failure_reason=failure_reason)
|
||||
|
||||
|
@ -6,7 +6,6 @@ from typing import Optional
|
||||
|
||||
import redis
|
||||
from redis.client import Redis
|
||||
from redis.typing import ResponseT
|
||||
|
||||
from danswer.configs.app_configs import REDIS_DB_NUMBER
|
||||
from danswer.configs.app_configs import REDIS_HEALTH_CHECK_INTERVAL
|
||||
@ -51,24 +50,6 @@ class TenantRedis(redis.Redis):
|
||||
else:
|
||||
raise TypeError(f"Unsupported key type: {type(key)}")
|
||||
|
||||
def exists(self, *names: Any) -> ResponseT:
|
||||
logger.notice(f"Checking existence for keys: {names}")
|
||||
prefixed_names = [self._prefixed(name) for name in names]
|
||||
|
||||
# Log the value and existing keys
|
||||
logger.notice(f"Checking existence for keys: {prefixed_names}")
|
||||
|
||||
# Log all existing keys (be cautious with this in production as it can be expensive)
|
||||
all_keys = self.keys("*")
|
||||
logger.notice(f"Existing keys: {all_keys}")
|
||||
|
||||
# Run the basic Redis exists method
|
||||
result = super().exists(*prefixed_names)
|
||||
|
||||
logger.notice(f"Existence check result: {result}")
|
||||
|
||||
return result
|
||||
|
||||
def _prefix_method(self, method: Callable) -> Callable:
|
||||
@functools.wraps(method)
|
||||
def wrapper(*args: Any, **kwargs: Any) -> Any:
|
||||
|
Loading…
x
Reference in New Issue
Block a user