Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions dev/tool/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1208,11 +1208,12 @@ export function devTool (
throw new Error('Datalake storage config is required')
}

toolCtx.info('using datalake', { datalake: datalakeConfig })
const datalake = createDatalakeClient(datalakeConfig as DatalakeConfig)

let workspaces: Workspace[] = []
const { dbUrl } = prepareTools()
await withDatabase(dbUrl, async (db) => {
const accountUrl = getAccountDBUrl()
await withDatabase(accountUrl, async (db) => {
workspaces = await listWorkspacesPure(db)
workspaces = workspaces
.filter((p) => p.mode !== 'archived')
Expand Down
12 changes: 11 additions & 1 deletion dev/tool/src/storage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -282,10 +282,19 @@ export async function copyToDatalake (
let time = Date.now()
let processedCnt = 0
let skippedCnt = 0
let failedCnt = 0

function printStats (): void {
const duration = Date.now() - time
console.log('...processed', processedCnt, 'skipped', skippedCnt, Math.round(duration / 1000) + 's')
console.log(
'...processed',
processedCnt,
'skipped',
skippedCnt,
'failed',
failedCnt,
Math.round(duration / 1000) + 's'
)

time = Date.now()
}
Expand Down Expand Up @@ -319,6 +328,7 @@ export async function copyToDatalake (
)
} catch (err) {
console.error('failed to process blob', objectName, err)
failedCnt++
}
})
}
Expand Down
Loading