Skip to content

Commit

Permalink
Merge branch 'main' into update-dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
serprex authored Dec 18, 2023
2 parents 015418f + 49b152e commit 3415fdb
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 219 deletions.
2 changes: 1 addition & 1 deletion flow/concurrency/bound_selector.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ type BoundSelector struct {
ferrors []error
}

func NewBoundSelector(limit int, total int, ctx workflow.Context) *BoundSelector {
func NewBoundSelector(limit int, ctx workflow.Context) *BoundSelector {
return &BoundSelector{
ctx: ctx,
limit: limit,
Expand Down
203 changes: 0 additions & 203 deletions flow/connectors/bigquery/qrecord_value_saver.go

This file was deleted.

4 changes: 1 addition & 3 deletions flow/workflows/snapshot_flow.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,6 @@ func (s *SnapshotFlowExecution) cloneTable(
return nil
}

// startChildQrepWorkflow starts a child workflow for query based replication.
func (s *SnapshotFlowExecution) cloneTables(
ctx workflow.Context,
slotInfo *protos.SetupReplicationOutput,
Expand All @@ -196,8 +195,7 @@ func (s *SnapshotFlowExecution) cloneTables(
slog.Info(fmt.Sprintf("cloning tables for slot name %s and snapshotName %s",
slotInfo.SlotName, slotInfo.SnapshotName))

numTables := len(s.config.TableMappings)
boundSelector := concurrency.NewBoundSelector(maxParallelClones, numTables, ctx)
boundSelector := concurrency.NewBoundSelector(maxParallelClones, ctx)

for _, v := range s.config.TableMappings {
source := v.SourceTableIdentifier
Expand Down
32 changes: 20 additions & 12 deletions ui/app/peers/page.tsx
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
'use client';
import { Button } from '@/lib/Button';
import { Icon } from '@/lib/Icon';
import { Label } from '@/lib/Label';
import { LayoutMain } from '@/lib/Layout';
import { Panel } from '@/lib/Panel';
import Link from 'next/link';
import { Header } from '../../lib/Header';
import { getTruePeer } from '../api/peers/route';
import prisma from '../utils/prisma';
import PeersTable from './peersTable';
export const dynamic = 'force-dynamic';

async function fetchPeers() {
const peers = await prisma.peers.findMany({});
return peers;
}
import { ProgressCircle } from '@/lib/ProgressCircle';

import useSWR from 'swr';

const fetcher = (...args: [any]) => fetch(...args).then((res) => res.json());

export default function Peers() {
const { data: peers, error, isLoading } = useSWR('/api/peers', fetcher);

export default async function Peers() {
let peers = await fetchPeers();
return (
<LayoutMain alignSelf='flex-start' justifySelf='flex-start' width='full'>
<Panel>
Expand All @@ -41,10 +42,17 @@ export default async function Peers() {
</Header>
</Panel>
<Panel>
<PeersTable
title='All peers'
peers={peers.map((peer) => getTruePeer(peer))}
/>
{isLoading && (
<div className='h-screen flex items-center justify-center'>
<ProgressCircle variant='determinate_progress_circle' />
</div>
)}
{!isLoading && (
<PeersTable
title='All peers'
peers={peers.map((peer: any) => peer)}
/>
)}
</Panel>
</LayoutMain>
);
Expand Down

0 comments on commit 3415fdb

Please sign in to comment.