Merge pull request #389 from storytold/brandon-combined-tts-queue-statistic

Show a combined TTS statistic (legacy + modern TTS)
This commit is contained in:
Brandon Thomas authored and GitHub committed 2023-11-28 21:06:20 -05:00
commit a2527bac4e
3 files changed
+21 -8

No files matched your search

@@ -15,9 +15,10 @@ export interface InferenceInfo {
}
export interface ByQueueStats {
pending_svc_jobs: number,
pending_rvc_jobs: number,
pending_face_animation_jobs: number,
pending_rvc_jobs: number,
pending_svc_jobs: number,
pending_tacotron2_jobs: number,
}
export interface LegacyTtsInfo {
@@ -114,9 +114,10 @@ export default function SideNav(props: SideNavProps) {
total_pending_job_count: 0,
pending_job_count: 0,
by_queue: {
pending_svc_jobs: 0,
pending_rvc_jobs: 0,
pending_face_animation_jobs: 0,
pending_rvc_jobs: 0,
pending_svc_jobs: 0,
pending_tacotron2_jobs: 0,
},
},
legacy_tts: {
@@ -223,6 +224,11 @@ export default function SideNav(props: SideNavProps) {
);
}
// NB(bt,2023-11-28): These are representative of tacotron2 jobs handled by two queueing systems:
// The legacy queue (tts-inference-job) and the modern queue (inference-job). We'll add both totals
// while we migrate off of the legacy system, then eventually kill the legacy statistic.
const ttsQueuedCount = queueStats.legacy_tts.pending_job_count + queueStats.inference.by_queue.pending_tacotron2_jobs;
return (
<div
id="sidebar-wrapper"
@@ -360,7 +366,7 @@ export default function SideNav(props: SideNavProps) {
<div>
{t("queueTts")}:{" "}
<span className="text-red">
{queueStats.legacy_tts.pending_job_count}
{ttsQueuedCount}
</span>
</div>
<div>
@@ -56,9 +56,10 @@ function FooterNav(props: Props) {
total_pending_job_count: 0,
pending_job_count: 0,
by_queue: {
pending_svc_jobs: 0,
pending_rvc_jobs: 0,
pending_face_animation_jobs: 0,
pending_rvc_jobs: 0,
pending_svc_jobs: 0,
pending_tacotron2_jobs: 0,
},
},
legacy_tts: {
@@ -122,6 +123,11 @@ function FooterNav(props: Props) {
);
}
// NB(bt,2023-11-28): These are representative of tacotron2 jobs handled by two queueing systems:
// The legacy queue (tts-inference-job) and the modern queue (inference-job). We'll add both totals
// while we migrate off of the legacy system, then eventually kill the legacy statistic.
const ttsQueuedCount = queueStats.legacy_tts.pending_job_count + queueStats.inference.by_queue.pending_tacotron2_jobs;
return (
<div>
<footer id="footer">
@@ -130,7 +136,7 @@ function FooterNav(props: Props) {
<div>
TTS Queued:{" "}
<span className="text-red">
{queueStats.legacy_tts.pending_job_count}
{ttsQueuedCount}
</span>
</div>
<span className="opacity-25">•</span>