Skip to content

Commit

Permalink
fixed bug with INDUCTION_COURSE_ID and added prometheus db engine
Browse files Browse the repository at this point in the history
  • Loading branch information
jabelone committed Sep 28, 2023
1 parent 9ab95b3 commit e2924a3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion memberportal/api_billing/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ def post(self, request):

score = (
canvas_api.get_student_score_for_course(
config.INDUCTION_COURSE_ID, request.user.email
config.CANVAS_INDUCTION_COURSE_ID, request.user.email
)
or 0
)
Expand Down
6 changes: 3 additions & 3 deletions memberportal/membermatters/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@
if "MM_USE_POSTGRES" in os.environ:
DATABASES = {
"default": {
"ENGINE": "django.db.backends.postgresql",
"ENGINE": "django_prometheus.db.backends.postgresql",
"NAME": os.environ.get("POSTGRES_DB", "membermatters"),
"USER": os.environ.get("POSTGRES_USER", "membermatters"),
"PASSWORD": os.environ.get("POSTGRES_PASSWORD", "membermatters"),
Expand All @@ -158,7 +158,7 @@
database_config = json.loads(os.environ["MMDB_SECRET"])
DATABASES = {
"default": {
"ENGINE": "django.db.backends.mysql",
"ENGINE": "django_prometheus.db.backends.mysql",
"NAME": database_config.get("dbname"),
"USER": database_config.get("username"),
"PASSWORD": database_config.get("password"),
Expand All @@ -169,7 +169,7 @@
else:
DATABASES = {
"default": {
"ENGINE": "django.db.backends.sqlite3",
"ENGINE": "django_prometheus.db.backends.sqlite3",
"NAME": os.environ.get("MM_DB_LOCATION", "/usr/src/data/db.sqlite3"),
}
}
Expand Down
4 changes: 2 additions & 2 deletions memberportal/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ django-celery-results~=2.3.1
django-celery-beat~=2.2.1
redis~=4.3.1
twilio~=7.9.2
django-prometheus==2.2.0
django-prometheus==2.3.1
psycopg2-binary~=2.9.6
django-oidc-provider~=0.8.0
django-oidc-provider~=0.8.0

0 comments on commit e2924a3

Please sign in to comment.