Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/truefoundry/evidently into …
Browse files Browse the repository at this point in the history
…np-add-reload
  • Loading branch information
nikp1172 committed Nov 25, 2024
2 parents 886d6d7 + d0eee70 commit eb18f48
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/evidently/ui/api/projects.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,16 @@ def reload_projects(
log_event("reload_projects")


@get("/reload", sync_to_thread=True)
def reload_projects(
project_manager: Annotated[ProjectManager, Dependency(skip_validation=True)],
log_event: Callable,
user_id: UserID,
) -> None:
project_manager.metadata._state.reload(force=True) # type: ignore
log_event("reload_projects")


@get("/{project_id:uuid}/info", sync_to_thread=True)
def get_project_info(
project_id: Annotated[uuid.UUID, Parameter(title="id of project")],
Expand Down Expand Up @@ -426,6 +436,7 @@ def create_projects_api(guard: Callable) -> Router:
delete_project,
add_snapshot,
delete_snapshot,
reload_projects,
],
guards=[guard],
),
Expand Down

0 comments on commit eb18f48

Please sign in to comment.