Skip to content

Commit a4cf2a8

Browse files
committed
fix: fix generation time calculation
1 parent 7eefc06 commit a4cf2a8

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

custom/ImageGenerationCarousel.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
<template>
33
<!-- Main modal -->
4-
<div tabindex="-1" class="[scrollbar-gutter:stable] fixed inset-0 z-10 flex justify-center items-center bg-gray-800/50 dark:bg-gray-900/50 overflow-y-auto">
4+
<div tabindex="-1" class="[scrollbar-gutter:stable] fixed inset-0 z-20 flex justify-center items-center bg-gray-800/50 dark:bg-gray-900/50 overflow-y-auto">
55
<div class="relative p-4 w-full max-w-[1600px]">
66
<!-- Modal content -->
77
<div class="relative bg-white rounded-lg shadow-xl dark:bg-gray-700">

index.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -257,9 +257,9 @@ export default class BulkAiFlowPlugin extends AdminForthPlugin {
257257

258258
const result = recordResult;
259259

260-
this.totalCalls++;
261-
this.totalDuration += (+new Date() - start) / 1000;
262260
if (!isError) {
261+
this.totalCalls++;
262+
this.totalDuration += (+new Date() - start) / 1000;
263263
jobs.set(jobId, { status: 'completed', result });
264264
return { ok: true }
265265
} else {
@@ -319,9 +319,10 @@ export default class BulkAiFlowPlugin extends AdminForthPlugin {
319319
return resp.imageURLs[0]
320320
})
321321
);
322-
this.totalCalls++;
323-
this.totalDuration += (+new Date() - start) / 1000;
322+
324323
if (!isError) {
324+
this.totalCalls++;
325+
this.totalDuration += (+new Date() - start) / 1000;
325326
jobs.set(jobId, { status: 'completed', result: { [fieldName]: images } });
326327
return { ok: true };
327328
} else {

0 commit comments

Comments
 (0)