Add support for rate limiting the amount of data indexed

- Add a dependency on the indexer API endpoint that rounds up the amount of data indexed and uses that to determine whether the next set of data should be processed
- Delete any files that are being removed for adminstering the calculation
- Show current amount of data indexed in the config page
This commit is contained in:
sabaimran
2023-11-25 20:28:04 -08:00
parent dd1badae81
commit b2afbaa315
8 changed files with 127 additions and 11 deletions

View File

@@ -9,10 +9,10 @@ from typing import Any, Dict, List, Optional, Union
from asgiref.sync import sync_to_async
# External Packages
from fastapi import APIRouter, Depends, Header, HTTPException, Request
from fastapi import APIRouter, Depends, HTTPException, Request
from fastapi.requests import Request
from fastapi.responses import Response, StreamingResponse
from starlette.authentication import requires, has_required_scope
from starlette.authentication import requires
# Internal Packages
from khoj.configure import configure_server