No description
- Python 99.6%
- Shell 0.2%
- Mako 0.1%
- Dockerfile 0.1%
|
Some checks failed
test / test (push) Has been cancelled
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> |
||
|---|---|---|
| .github | ||
| carina | ||
| local | ||
| tests | ||
| .coveragerc | ||
| .dockerignore | ||
| .gitignore | ||
| alembic.ini | ||
| asgi.py | ||
| Dockerfile | ||
| poetry.lock | ||
| pyproject.toml | ||
| README.md | ||
| renovate.json | ||
| style.sh | ||
Carina
BPL Reward Management API
configurations
- create a
local.envfile in the root directory - add your configurations based on the environmental variables required in
carina.core.config.Settingsor use the filelocal/local.env.exampleas template
running
poetry install
api run
poetry run python asgi.pyorpoetry run uvicorn asgi:app --port=8000
reward allocation worker (rq)
OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES poetry run python -m carina.core.cli task-worker- this worker deals with asynchronous tasks e.g. allocating rewards to account_holders, through Polaris' API
Running the command with the above environment variable is a work around for this issue. It's a mac only issue to do with os.fork()'ing which rq.Worker utilises.
cron scheduler (apscheduler)
poetry run python -m carina.core.cli cron-scheduler- schedules regular tasks:
- downloading reward status change files and inserting into the reward_update table
- downloading reward import files and inserting into the reward table