Skip to content

Commit 6d35970

Browse files
authored
Remove 1 when getting db connection (#1421)
1 parent 1246707 commit 6d35970

File tree

7 files changed

+9
-7
lines changed

7 files changed

+9
-7
lines changed

services/apps/integration_data_worker/src/bin/process-data-for-tenant.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ setImmediate(async () => {
2121
const emitter = new IntegrationDataWorkerEmitter(sqsClient, log)
2222
await emitter.init()
2323

24-
const dbConnection = await getDbConnection(DB_CONFIG(), 1)
24+
const dbConnection = await getDbConnection(DB_CONFIG())
2525
const store = new DbStore(log, dbConnection)
2626
const repo = new IntegrationDataRepository(store, log)
2727

services/apps/integration_data_worker/src/bin/process-data.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ setImmediate(async () => {
2121
const emitter = new IntegrationDataWorkerEmitter(sqsClient, log)
2222
await emitter.init()
2323

24-
const dbConnection = await getDbConnection(DB_CONFIG(), 1)
24+
const dbConnection = await getDbConnection(DB_CONFIG())
2525
const store = new DbStore(log, dbConnection)
2626
const repo = new IntegrationDataRepository(store, log)
2727

services/apps/integration_run_worker/src/bin/continue-run.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,16 @@ setImmediate(async () => {
1616
const emitter = new IntegrationRunWorkerEmitter(sqsClient, log)
1717
await emitter.init()
1818

19-
const dbConnection = await getDbConnection(DB_CONFIG(), 1)
19+
const dbConnection = await getDbConnection(DB_CONFIG())
2020
const store = new DbStore(log, dbConnection)
2121

2222
const repo = new IntegrationRunRepository(store, log)
2323

2424
const run = await repo.findIntegrationRunById(runId)
2525

2626
if (run) {
27+
log.info({ run }, 'Found run!')
28+
2729
if (run.state != IntegrationRunState.PENDING) {
2830
log.warn(`Integration run is not pending, setting to pending!`)
2931

services/apps/integration_run_worker/src/bin/onboard-integration.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ setImmediate(async () => {
1616
const emitter = new IntegrationRunWorkerEmitter(sqsClient, log)
1717
await emitter.init()
1818

19-
const dbConnection = await getDbConnection(DB_CONFIG(), 1)
19+
const dbConnection = await getDbConnection(DB_CONFIG())
2020
const store = new DbStore(log, dbConnection)
2121

2222
const repo = new IntegrationRunRepository(store, log)

services/apps/integration_run_worker/src/bin/process-repo.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ setImmediate(async () => {
6868
const emitter = new IntegrationRunWorkerEmitter(sqsClient, log)
6969
await emitter.init()
7070

71-
const dbConnection = await getDbConnection(DB_CONFIG(), 1)
71+
const dbConnection = await getDbConnection(DB_CONFIG())
7272
const store = new DbStore(log, dbConnection)
7373

7474
const repo = new IntegrationRunRepository(store, log)

services/apps/integration_run_worker/src/bin/trigger-all-onboardings.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ setImmediate(async () => {
1313
const emitter = new IntegrationRunWorkerEmitter(sqsClient, log)
1414
await emitter.init()
1515

16-
const dbConnection = await getDbConnection(DB_CONFIG(), 1)
16+
const dbConnection = await getDbConnection(DB_CONFIG())
1717
const store = new DbStore(log, dbConnection)
1818

1919
const repo = new IntegrationRunRepository(store, log)

services/apps/integration_stream_worker/src/bin/process-stream.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ setImmediate(async () => {
2121
const emitter = new IntegrationStreamWorkerEmitter(sqsClient, log)
2222
await emitter.init()
2323

24-
const dbConnection = await getDbConnection(DB_CONFIG(), 1)
24+
const dbConnection = await getDbConnection(DB_CONFIG())
2525
const store = new DbStore(log, dbConnection)
2626
const repo = new IntegrationStreamRepository(store, log)
2727

0 commit comments

Comments
 (0)