Skip to content

Commit

Permalink
fix: replicate
Browse files Browse the repository at this point in the history
  • Loading branch information
riderx committed Oct 30, 2024
1 parent e72a297 commit da94e57
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion supabase/functions/_backend/private/verify_replication.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ app.get('/', async (c: Context) => {
}, {} as Record<string, { d1: number, supabase: number, percent: number }>)
// if diff less than 1% of total rows, consider it as synced
const totalPercent = Object.values(diff).reduce((acc, table) => acc + table.percent, 0)
const diffPercentage = Object.keys(diff).length / totalPercent
const diffPercentage = totalPercent / Object.keys(diff).length
if (diffPercentage < 2) {
return c.json({
status: 'ok',
Expand Down

0 comments on commit da94e57

Please sign in to comment.