Skip to content
This repository was archived by the owner on Mar 7, 2024. It is now read-only.

Commit b473317

Browse files
pauldambraxvello
authored andcommitted
oops
1 parent d442ff2 commit b473317

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

Diff for: index.ts

+5-7
Original file line numberDiff line numberDiff line change
@@ -179,14 +179,13 @@ export const insertBatchIntoPostgres = async (payload: UploadJobPayload, { globa
179179
const { uuid, eventName, properties, elements, set, set_once, distinct_id, team_id, ip, site_url, timestamp } =
180180
payload.batch[i]
181181

182-
183182
// Creates format: ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11), ($12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22)
184183
valuesString += ' ('
185184
for (let j = 1; j <= 11; ++j) {
186185
valuesString += `$${11 * i + j}${j === 11 ? '' : ', '}`
187186
}
188187
valuesString += `)${i === payload.batch.length - 1 ? '' : ','}`
189-
188+
190189
values = values.concat([
191190
uuid || generateUuid(),
192191
eventName,
@@ -243,20 +242,19 @@ const executeQuery = async (query: string, values: any[], config: PostgresMeta['
243242
database: config.dbName,
244243
port: parseInt(config.port),
245244
}
246-
245+
247246
let error: Error | null = null
248-
249-
let pgClient = Client | null = null
247+
248+
let pgClient: Client | null = null
250249
try {
251250
pgClient = new Client({
252251
...basicConnectionOptions,
253252
ssl: {
254253
rejectUnauthorized: config.hasSelfSignedCert === 'No',
255254
},
256255
})
257-
258256
await pgClient.connect()
259-
await pgClient.query(query, values)
257+
//await pgClient.query(query, values)
260258
} catch (err) {
261259
error = err as Error
262260
} finally {

0 commit comments

Comments
 (0)