- Notifications
You must be signed in to change notification settings - Fork0
Post users to bus api forhttps://github.com/topcoder-platform/u-bahn-user-skills-processor to process
topcoder-archive/topcoder_platform-u-bahn-backendjob
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
DEPRECATED - Feb 1, 2024 - seehttps://topcoder.atlassian.net/browse/CORE-203
Queries U-bahn's database for users and posts them to kafka to be picked up by the u-bahn-skill processor
- Nodejs(v12+)
- docker
- Redis
- PostgreSQL
Configuration for the skill processor trigger is atconfig/default.js.The following parameters can be set in config files or in env variables:
- LOG_LEVEL: the log level; default value: 'debug'
- DB_NAME: the database name
- DB_USERNAME: the database username
- DB_PASSWORD: the database password
- DB_HOST: the database host
- DB_PORT: the database port
- AUTH0_URL: Auth0 URL, used to get TC M2M token
- AUTH0_AUDIENCE: Auth0 audience, used to get TC M2M token
- TOKEN_CACHE_TIME: Auth0 token cache time, used to get TC M2M token
- AUTH0_CLIENT_ID: Auth0 client id, used to get TC M2M token
- AUTH0_CLIENT_SECRET: Auth0 client secret, used to get TC M2M token
- AUTH0_PROXY_SERVER_URL: Proxy Auth0 URL, used to get TC M2M token
- BUSAPI_URL: Topcoder Bus API URL
- KAFKA_ERROR_TOPIC: The error topic at which bus api will publish any errors
- KAFKA_MESSAGE_ORIGINATOR: The originator value for the kafka messages
- SKILL_SYNC_TOPIC: the sync skill Kafka message topic, default value is 'backgroundjob.sync.user.skills'
- REDIS_HOST: the redis host, default value is 'localhost',
- REDIS_PORT: the redis port, default value is 6379,
- REDIS_PASSWORD: the redis password,
- REDIS_USER: the redis user,
- USER_RECORD_OFFSET: the record offset, default value is 0,
- USER_RECORD_LIMIT: the record limit, default value is 10,
- OFFSET_REDIS_KEY: the redis of offset key, default value is 'USER_RECORD_OFFSET',
- SLEEP_TIME: The pause time between two create operations, default value: 1000 ms
- Navigate to the directory
docker-redis-db - Run the command
docker-compose up -d
From the project root directory, run the following command to install the dependencies
npm install
To run linters if required
npm run lint
To fix possible lint errors:
npm run lint:fix
Start the processor and health check dropin
npm start
To run the Skill Processor Trigger using docker, follow the below steps
Navigate to the directory
dockerRename the file
sample.api.envtoapi.envSet the auth0 config in the file
api.envOnce that is done, run the following command
docker-compose up
When you are running the application for the first time, It will take some time initially to download the image and install the dependencies
- config
AUTH0_CLIENT_ID,AUTH0_CLIENT_SECRET - run
npm run insert-datato load test data to db - run
npm startto post event when there is not offset key in redis - run
npm startto post event when there is an offset key in redis - watch the app console, it will show the offset and post message
About
Post users to bus api forhttps://github.com/topcoder-platform/u-bahn-user-skills-processor to process
Resources
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors2
Uh oh!
There was an error while loading.Please reload this page.