fix: improve maintenance and synchronize live conversations
This commit is contained in:
1 parent
bb541bd212
commit
ef86a5d3af
297 files changed
+2983
-1274
No files matched your search
@@ -14,7 +14,6 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
"""
|
||||
|
||||
import random
|
||||
import re
|
||||
import socket
|
||||
import threading
|
||||
@@ -22,13 +21,12 @@ import time
|
||||
from copy import deepcopy
|
||||
from datetime import datetime
|
||||
from dataclasses import dataclass, field
|
||||
from typing import Dict, List, Set, Tuple, Optional, Callable
|
||||
from typing import Dict, List, Tuple, Optional, Callable
|
||||
from urllib.parse import urljoin, urlparse, urldefrag, urlunparse
|
||||
from app.knowledge.crawler_identity import CRAWLER_USER_AGENT
|
||||
from app.knowledge.url_safety import BlockedHostError
|
||||
from app.knowledge.deadline import Deadline
|
||||
from app.knowledge.page_fetch import NotAPage, fetch_page_text
|
||||
import concurrent.futures
|
||||
from concurrent.futures import ThreadPoolExecutor, as_completed
|
||||
|
||||
from bs4 import BeautifulSoup, Tag
|
||||
@@ -47,7 +45,7 @@ from app.knowledge.crawl_scope import (
|
||||
url_scheme,
|
||||
)
|
||||
from app.knowledge.domains import registrable_domain
|
||||
from app.knowledge.failure_advice import FAILURE_ADVICE, FailureCause
|
||||
from app.knowledge.failure_advice import FAILURE_ADVICE as FAILURE_ADVICE, FailureCause
|
||||
from app.knowledge.main_content import select_main_node
|
||||
|
||||
# Initialize logger for this module
|
||||
@@ -1330,4 +1328,4 @@ class EnhancedWebsiteReader(WebsiteReader):
|
||||
duration = end_time - start_time
|
||||
logger.info(f"[{datetime.now().strftime('%Y-%m-%d %H:%M:%S')}] Completed reading from {url} - Created {len(documents)} documents (Total time: {duration:.2f}s)")
|
||||
|
||||
return documents
|
||||
return documents
|
||||
Reference in new issue
Block a user