mirror of
https://github.com/t8y2/dbx.git
synced 2026-10-30 16:21:39 +00:00
perf: race GitHub proxies concurrently for driver downloads and registry fetch
Replace sequential proxy fallback (up to 30s worst-case) with concurrent racing via futures::select_ok, returning the first successful response. Add list_installed_agents_local command for instant UI rendering with async registry update. Fix missing useToast import in RedisValueViewer.
This commit is contained in:
@@ -238,7 +238,17 @@ async function deleteJdbcDriver(path: string) {
|
||||
// ──────────── Lifecycle ────────────
|
||||
|
||||
onMounted(async () => {
|
||||
await refreshAgents();
|
||||
const [jre, localDrivers] = await Promise.all([
|
||||
invoke<boolean>("check_jre_installed"),
|
||||
invoke<AgentDriverInfo[]>("list_installed_agents_local"),
|
||||
]);
|
||||
jreInstalled.value = jre;
|
||||
drivers.value = localDrivers;
|
||||
|
||||
invoke<AgentDriverInfo[]>("list_installed_agents").then((result) => {
|
||||
drivers.value = result;
|
||||
});
|
||||
|
||||
unlisten = await listen<InstallProgress>("agent-install-progress", (event) => {
|
||||
if (event.payload.step === "done") {
|
||||
progress.value = null;
|
||||
|
||||
@@ -9,6 +9,7 @@ import { Sheet, SheetContent, SheetFooter, SheetHeader, SheetTitle } from "@/com
|
||||
import DangerConfirmDialog from "@/components/editor/DangerConfirmDialog.vue";
|
||||
import * as api from "@/lib/api";
|
||||
import type { RedisValue } from "@/lib/api";
|
||||
import { useToast } from "@/composables/useToast";
|
||||
import {
|
||||
canEditRedisMemberDetail,
|
||||
clampRedisMemberDetailSheetWidth,
|
||||
@@ -18,6 +19,7 @@ import {
|
||||
} from "@/lib/redisValuePresentation";
|
||||
|
||||
const { t } = useI18n();
|
||||
const { toast } = useToast();
|
||||
|
||||
const props = defineProps<{
|
||||
connectionId: string;
|
||||
|
||||
Reference in New Issue
Block a user