Skip to content

Commit

Permalink
[Updater] Add new REDIS_HOST env variable to updater-worker and upd…
Browse files Browse the repository at this point in the history
…ater-scheduler
  • Loading branch information
valtterikantanen committed Feb 21, 2025
1 parent e66542f commit 78719ee
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docker-compose.ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ services:
CI: 'true'
DB_URL: postgres://postgres@sis-db:5432/sis-db
REDIS_URI: //redis:6379
REDIS_HOST: redis
SIS_IMPORTER_DATABASE: sis-importer-db
SIS_IMPORTER_HOST: sis-importer-db
SIS_IMPORTER_PASSWORD: postgres
Expand All @@ -145,6 +146,7 @@ services:
environment:
CI: 'true'
REDIS_URI: //redis:6379
REDIS_HOST: redis
SECRET_TOKEN: dev
SIS_IMPORTER_DATABASE: sis-importer-db
SIS_IMPORTER_HOST: sis-importer-db
Expand Down
2 changes: 2 additions & 0 deletions docker-compose.fd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ services:
- sis-updater-nats
environment:
REDIS_URI: //redis:6379
REDIS_HOST: redis
SECRET_TOKEN: dev
SIS_IMPORTER_HOST: ${SIS_IMPORTER_DB_HOST:-host.docker.internal}
SIS_IMPORTER_PORT: ${SIS_IMPORTER_DB_PORT:-15234}
Expand Down Expand Up @@ -156,6 +157,7 @@ services:
environment:
DB_URL: postgres://postgres@sis-db:5432/sis-db
REDIS_URI: //redis:6379
REDIS_HOST: redis
SIS_IMPORTER_HOST: ${SIS_IMPORTER_DB_HOST:-host.docker.internal}
SIS_IMPORTER_PORT: ${SIS_IMPORTER_DB_PORT:-15234}
SIS_IMPORTER_DATABASE: importer-db
Expand Down
2 changes: 2 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ services:
- sis-updater-nats
environment:
REDIS_URI: //redis:6379
REDIS_HOST: redis
SECRET_TOKEN: dev
SIS_IMPORTER_DATABASE: sis-importer-db
SIS_IMPORTER_HOST: sis-importer-db
Expand Down Expand Up @@ -151,6 +152,7 @@ services:
environment:
DB_URL: postgres://postgres@sis-db:5432/sis-db
REDIS_URI: //redis:6379
REDIS_HOST: redis
SIS_IMPORTER_DATABASE: sis-importer-db
SIS_IMPORTER_HOST: sis-importer-db
SIS_IMPORTER_PASSWORD: postgres
Expand Down
1 change: 1 addition & 0 deletions updater/sis-updater-scheduler/src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ module.exports.REDIS_LATEST_MESSAGE_RECEIVED = 'LATEST_MESSAGE_RECEIVED'
module.exports.LATEST_MESSAGE_RECEIVED_THRESHOLD = 1000 * 60 * 5
module.exports.REDIS_LAST_WEEKLY_SCHEDULE = 'LAST_WEEKLY_SCHEDULE'
module.exports.REDIS_LAST_PREPURGE_INFO = 'LAST_PREPURGE_INFO'
module.exports.REDIS_HOST = process.env.REDIS_HOST

module.exports.EXIT_AFTER_IMMEDIATES = process.env.EXIT_AFTER_IMMEDIATES === 'yes'
module.exports.SCHEDULE_IMMEDIATE = process.env.SCHEDULE_IMMEDIATE?.split(',') || []
Expand Down
1 change: 1 addition & 0 deletions updater/sis-updater-worker/src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ module.exports.SIS_MISC_SCHEDULE_CHANNEL = 'SIS_MISC_SCHEDULE_CHANNEL'
module.exports.SIS_PURGE_CHANNEL = 'SIS_PURGE_CHANNEL'
module.exports.MIGRATIONS_LOCK = 'MIGRATIONS_LOCK'
module.exports.PURGE_LOCK = 'PURGE_LOCK'
module.exports.REDIS_HOST = process.env.REDIS_HOST
module.exports.REDIS_TOTAL_META_KEY = 'TOTAL_META'
module.exports.REDIS_TOTAL_STUDENTS_KEY = 'TOTAL_STUDENTS'
module.exports.REDIS_TOTAL_META_DONE_KEY = 'TOTAL_META_DONE'
Expand Down

0 comments on commit 78719ee

Please sign in to comment.