Skip to content

Commit

Permalink
cwv-tech-report to prod db
Browse files Browse the repository at this point in the history
  • Loading branch information
max-ostapenko committed Dec 9, 2024
1 parent 9fd868a commit e859d29
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions infra/dataform-export/firestore.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export class FirestoreBatch {
constructor () {
this.firestore = new Firestore()
this.bigquery = new BigQueryExport()
this.firestore.settings({ databaseId: 'tech-report-apis-dev' })
this.firestore.settings({ databaseId: 'tech-report-apis-prod' })
this.batchSize = 500
this.maxConcurrentBatches = 200
}
Expand All @@ -28,7 +28,7 @@ export class FirestoreBatch {
batch.delete(doc.ref)
} else if (operation === 'set') {
const docId = technologyHashId(doc, this.collectionName, TECHNOLOGY_QUERY_ID_KEYS)
const docRef = this.firestore.collection(this.collectionName + '_v2').doc(docId) // TODO: remove _v2 used for testing
const docRef = this.firestore.collection(this.collectionName).doc(docId)
batch.set(docRef, doc)
} else {
throw new Error('Invalid operation')
Expand Down Expand Up @@ -68,7 +68,7 @@ export class FirestoreBatch {
this.batchPromises = []

let totalDocsDeleted = 0
const collectionRef = this.firestore.collection(this.collectionName + '_v2') // TODO: remove _v2 used for testing
const collectionRef = this.firestore.collection(this.collectionName)

let collectionQuery
if (this.collectionType === 'report') {
Expand Down

0 comments on commit e859d29

Please sign in to comment.