Skip to content

Commit 6c28b86

Browse files
committed
make workers an env variable
1 parent 63257f8 commit 6c28b86

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

deployment/clouddeploy/gke-workers/environments/oss-vdb-test/debian-cve-convert.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,5 @@ spec:
1616
value: osv-test-debian-osv
1717
- name: INPUT_GCS_BUCKET
1818
value: osv-test-cve-osv-conversion
19+
- name: NUM_WORKERS
20+
value: 256

vulnfeeds/cmd/debian/run_debian_convert.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ OSV_OUTPUT_PATH="debian-cve-osv"
1212
INPUT_BUCKET="${INPUT_GCS_BUCKET:=osv-test-cve-osv-conversion}"
1313
OUTPUT_BUCKET="${OUTPUT_GCS_BUCKET:=osv-test-debian-osv}"
1414
CVE_OUTPUT="cve_jsons/"
15-
15+
WORKERS="${NUM_WORKERS:=256}"
1616

1717
echo "Setup initial directories ${OSV_OUTPUT_PATH}"
1818
rm -rf $OSV_OUTPUT_PATH && mkdir -p $OSV_OUTPUT_PATH
@@ -22,5 +22,5 @@ echo "Begin syncing NVD data from GCS bucket ${INPUT_BUCKET}"
2222
gcloud --no-user-output-enabled storage -q cp "gs://${INPUT_BUCKET}/nvd/*-????.json" "${CVE_OUTPUT}"
2323
echo "Successfully synced from GCS bucket"
2424

25-
./debian-osv -output_bucket "$OUTPUT_BUCKET" -output_path "$OSV_OUTPUT_PATH" -num_workers "256"
25+
./debian-osv -output_bucket "$OUTPUT_BUCKET" -output_path "$OSV_OUTPUT_PATH" -num_workers "$WORKERS"
2626
echo "Successfully converted and uploaded to cloud"

0 commit comments

Comments
 (0)