Skip to content

Commit

Permalink
Make sure number of workers launched is always displayed
Browse files Browse the repository at this point in the history
Fixes #578
  • Loading branch information
pgiraud committed Mar 20, 2023
1 parent 2a21eac commit 37d5865
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/PlanNodeDetail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,7 @@ watch(activeTab, () => {
</div>
<div>
<b>Workers launched: </b>
<span class="px-1">{{ node[NodeProp.WORKERS_LAUNCHED] }}</span>
<span class="px-1">{{ workersLaunchedCount }}</span>
</div>
<div
v-if="!workersLaunchedCount && node[NodeProp.WORKERS_PLANNED_BY_GATHER]"
Expand Down
3 changes: 3 additions & 0 deletions src/node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,9 @@ export default function useNode(

const workersLaunchedCount = computed((): number => {
console.warn("Make sure it works for workers that are not array")
if (node[NodeProp.WORKERS_LAUNCHED]) {
return node[NodeProp.WORKERS_LAUNCHED] as number
}
const workers = node[NodeProp.WORKERS] as Worker[]
return workers ? workers.length : NaN
})
Expand Down

0 comments on commit 37d5865

Please sign in to comment.