Skip to content

Commit 0f33398

Browse files
committed
fix: comments
Signed-off-by: Uroš Marolt <uros@marolt.me>
1 parent aac2ccd commit 0f33398

4 files changed

Lines changed: 4 additions & 5 deletions

File tree

scripts/cli

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ function monitor_workflow() {
273273
--workflow "$WORKFLOW_FILE" \
274274
--limit 1 \
275275
--json databaseId \
276-
--jq '.[0].databaseId' 2>/dev/null || echo "")
276+
--jq '.[0].databaseId // empty' 2>/dev/null || echo "")
277277

278278
if [[ -n "$CANDIDATE" ]] && ! echo "$EXISTING_IDS" | grep -q "^${CANDIDATE}$"; then
279279
RUN_ID="$CANDIDATE"

services/apps/packages_worker/src/deps-dev/activities/manageVersionsIndexes.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,13 +91,13 @@ export async function rebuildVersionsIndexes(): Promise<{
9191
)
9292
const rebuilt: string[] = []
9393

94-
// Build indexes in parallel — each needs its own connection.
94+
// Build indexes in parallel — each on its own connection so they run concurrently.
9595
// maintenance_work_mem per connection: with 32 partitions and default 64MB, PG spills to
9696
// disk on every partition; 2GB lets the sort fit in RAM and cuts build time dramatically.
97-
// Build indexes in parallel — each on its own connection so they run concurrently.
9897
await Promise.all(
9998
toRebuild.map(async (idx) => {
10099
const conn = await getPackagesDb()
100+
await conn.result(`SET LOCAL maintenance_work_mem = '2GB'`)
101101
log.info({ columns: idx.columns }, 'Creating index on versions')
102102
await conn.result(idx.createSql)
103103
rebuilt.push(idx.columns)

services/apps/packages_worker/src/deps-dev/workflows/ingestDependencies.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ export async function ingestDependencies(opts: {
230230
runId: opts.runId,
231231
syncMode: opts.syncMode,
232232
snapshotAt: opts.today,
233-
maxBytesGb: opts.syncMode === 'full' ? 25000 : 10000,
233+
maxBytesGb: opts.syncMode === 'full' || isFill ? 25000 : 10000,
234234
reuseExports: opts.reuseExports,
235235
exportName: opts.exportName,
236236
ecosystems: opts.ecosystems,

services/apps/packages_worker/src/scripts/dedupPackageDeps.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
* --concurrency <n> Partitions to process in parallel (default: 8).
1313
* --dry-run Count duplicates without deleting.
1414
*/
15-
1615
import { getServiceChildLogger } from '@crowd/logging'
1716

1817
import { getPackagesDb } from '../db'

0 commit comments

Comments
 (0)