File tree Expand file tree Collapse file tree 3 files changed +57
-2
lines changed
Expand file tree Collapse file tree 3 files changed +57
-2
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,10 @@ WEBHOOK_PATH=/api/github/webhooks
1414# Pull configurations
1515CONFIG_FILENAME = pull.yml
1616DEFAULT_MERGE_METHOD = hardreset
17+ # MongoDB
18+ MONGODB_URL = mongodb://root:mongodb_password@mongodb:27017
19+ # Redis
20+ REDIS_URL = redis://redis:6379
1721
1822# Optional #
1923
Original file line number Diff line number Diff line change @@ -12,6 +12,10 @@ services:
1212 # volumes:
1313 # - .:/app
1414 command : deno task dev
15+ # # Skip full-sync on startup:
16+ # command: deno task dev:skip-full-sync
17+ # # Run full-sync manually:
18+ # > docker exec -it <CONTAINER_NAME> deno task full-sync
1519
1620 worker :
1721 build : .
@@ -25,6 +29,11 @@ services:
2529 # volumes:
2630 # - .:/app
2731 command : deno task worker
32+ deploy :
33+ mode : replicated
34+ replicas : 3
35+ # If running without swarm mode, you can use the following command to scale the worker:
36+ # > docker compose up -d --scale worker=3
2837
2938 mongodb :
3039 image : mongo:8
@@ -45,6 +54,38 @@ services:
4554 # ports:
4655 # - "6379:6379"
4756
57+ # mongo-express:
58+ # image: mongo-express
59+ # restart: unless-stopped
60+ # depends_on:
61+ # - mongodb
62+ # environment:
63+ # ME_CONFIG_MONGODB_URL: mongodb://root:mongodb_password@mongodb:27017/
64+ # ME_CONFIG_BASICAUTH: false
65+ # ports:
66+ # - "8081:8081"
67+
68+ # redis-commander:
69+ # image: rediscommander/redis-commander:latest
70+ # restart: unless-stopped
71+ # environment:
72+ # REDIS_HOSTS: redis
73+ # depends_on:
74+ # - redis
75+ # ports:
76+ # - "8082:8081"
77+
78+ # bullboard:
79+ # image: addono/bull-board:latest
80+ # restart: unless-stopped
81+ # environment:
82+ # REDIS_HOST: redis
83+ # PORT: 8083
84+ # depends_on:
85+ # - redis
86+ # ports:
87+ # - "8083:8083"
88+
4889volumes :
4990 mongodb-data :
5091 redis-data :
Original file line number Diff line number Diff line change @@ -68,9 +68,19 @@ function getRepoHandlers(
6868 const full_name = `${ req . params . owner } /${ req . params . repo } ` ;
6969 app . log . info ( { full_name } , `Processing` ) ;
7070
71- await schedulerService . processRepository ( { fullName : full_name } , true ) ;
71+ try {
72+ await schedulerService . processRepository ( { fullName : full_name } , true ) ;
7273
73- res . json ( { status : "queued" } ) ;
74+ res . json ( { status : "queued" } ) ;
75+ } catch ( error ) {
76+ app . log . error ( error ) ;
77+ res . status ( 500 ) . json ( {
78+ status : "error" ,
79+ message : error instanceof Error
80+ ? error . message
81+ : "Unknown error occurred" ,
82+ } ) ;
83+ }
7484 }
7585
7686 return {
You can’t perform that action at this time.
0 commit comments