No description
This repository has been archived on 2026-04-20. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
  • Python 99.6%
  • Shell 0.2%
  • Mako 0.1%
  • Dockerfile 0.1%
Find a file
renovate[bot] e236cf6d07
Some checks failed
test / test (push) Has been cancelled
Update dependency ipython to v8.23.0 (#218)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-18 15:20:29 +01:00
.github Dependabot Config, v6 2024-04-17 16:46:16 +01:00
carina Upgrade CI, Remove Linkerd Await 2024-04-17 15:27:11 +01:00
local BPL-365-Update-polaris-url (#27) 2022-01-14 10:30:27 +00:00
tests WAL-3320 update pypi source 2024-01-17 11:53:18 +02:00
.coveragerc Migrate from pipenv to poetry 2022-09-20 17:50:01 +01:00
.dockerignore Migrate from pipenv to poetry 2022-09-20 17:50:01 +01:00
.gitignore BPL-121 boilerplate + voucher config table 2021-06-29 10:40:29 +01:00
alembic.ini Upgrade CI, Remove Linkerd Await 2024-04-17 15:27:11 +01:00
asgi.py Migrate from pipenv to poetry 2022-09-20 17:50:01 +01:00
Dockerfile Upgrade CI, Remove Linkerd Await 2024-04-17 15:27:11 +01:00
poetry.lock Update dependency ipython to v8.23.0 (#218) 2024-04-18 15:20:29 +01:00
pyproject.toml Update dependency httpx to ^0.27.0 (#217) 2024-04-18 15:16:42 +01:00
README.md Migrate from pipenv to poetry 2022-09-20 17:50:01 +01:00
renovate.json Assign Renovate to Developers (#213) 2024-04-18 11:18:22 +01:00
style.sh BPL-1066 upgrade starlette (CVE-2023-30798) via fastapi 2023-05-02 08:39:16 +01:00

Carina

BPL Reward Management API

configurations

  • create a local.env file in the root directory
  • add your configurations based on the environmental variables required in carina.core.config.Settings or use the file local/local.env.example as template

running

  • poetry install

api run

  • poetry run python asgi.py or poetry 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