Skip to content

Commit

Permalink
Starting script + increase server size (#4653)
Browse files Browse the repository at this point in the history
  • Loading branch information
lasryaric authored Apr 10, 2024
1 parent 89f969f commit 118953e
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 14 deletions.
1 change: 1 addition & 0 deletions connectors/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"start": "tsx ./src/start.ts -p 3002",
"start:web": "tsx ./src/start_server.ts -p 3002",
"start:worker": "tsx ./src/start_worker.ts",
"start:worker:processes": "./src/start_all_workers.sh",
"cli": "npx tsx src/admin/cli.ts",
"initdb": "npx tsx src/admin/db.ts"
},
Expand Down
22 changes: 22 additions & 0 deletions connectors/src/start_all_workers.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/bash

# Bash scripts that starts all the workers in the background
# and fails when any of them fails.
# The return code of the first failing worker is returned
# as the return code of this script.

fail() {
wait -n
exit $?
}

npm run start:worker -- --workers confluence &
npm run start:worker -- --workers github &
npm run start:worker -- --workers google_drive &
npm run start:worker -- --workers intercom &
# npm run start:worker -- --workers notion & // notion is running on its own pod so no need to run it here
npm run start:worker -- --workers slack &
npm run start:worker -- --workers webcrawler &


fail
18 changes: 4 additions & 14 deletions k8s/deployments/connectors-worker-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,8 @@ spec:
containers:
- name: web
image: gcr.io/or1g1n-186209/connectors-image:latest
command: ["npm", "run", "start:worker"]
args:
[
"--",
"--workers",
"confluence",
"github",
"google_drive",
"intercom",
"slack",
"webcrawler",
]
command: ["npm", "run", "start:worker:processes"]
args: []
imagePullPolicy: Always
envFrom:
- configMapRef:
Expand All @@ -53,12 +43,12 @@ spec:
resources:
requests:
cpu: 3000m
memory: 8Gi
memory: 32Gi
ephemeral-storage: 32Gi

limits:
cpu: 3000m
memory: 8Gi
memory: 32Gi
ephemeral-storage: 32Gi

volumes:
Expand Down

0 comments on commit 118953e

Please sign in to comment.