mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-04-03 09:28:25 +02:00
* move indexing * all monitor work moved * reacquire lock more * remove monitor task completely * fix import * fix pruning finalization * no multiplier on system/cloud tasks * monitor queues every 30 seconds in the cloud --------- Co-authored-by: Richard Kuo (Danswer) <rkuo@onyx.app>
30 lines
1.1 KiB
Python
30 lines
1.1 KiB
Python
from onyx.redis.redis_connector_credential_pair import (
|
|
RedisGlobalConnectorCredentialPair,
|
|
)
|
|
from onyx.redis.redis_connector_delete import RedisConnectorDelete
|
|
from onyx.redis.redis_connector_doc_perm_sync import RedisConnectorPermissionSync
|
|
from onyx.redis.redis_connector_index import RedisConnectorIndex
|
|
from onyx.redis.redis_connector_prune import RedisConnectorPrune
|
|
from onyx.redis.redis_document_set import RedisDocumentSet
|
|
from onyx.redis.redis_usergroup import RedisUserGroup
|
|
|
|
|
|
def is_fence(key_bytes: bytes) -> bool:
|
|
key_str = key_bytes.decode("utf-8")
|
|
if key_str == RedisGlobalConnectorCredentialPair.FENCE_KEY:
|
|
return True
|
|
if key_str.startswith(RedisDocumentSet.FENCE_PREFIX):
|
|
return True
|
|
if key_str.startswith(RedisUserGroup.FENCE_PREFIX):
|
|
return True
|
|
if key_str.startswith(RedisConnectorDelete.FENCE_PREFIX):
|
|
return True
|
|
if key_str.startswith(RedisConnectorPrune.FENCE_PREFIX):
|
|
return True
|
|
if key_str.startswith(RedisConnectorIndex.FENCE_PREFIX):
|
|
return True
|
|
if key_str.startswith(RedisConnectorPermissionSync.FENCE_PREFIX):
|
|
return True
|
|
|
|
return False
|