Skip to content

Commit

Permalink
Feature: Add server side cursors option (MIT-LCP#2333)
Browse files Browse the repository at this point in the history
This option is responsible for a specific django behaviour about
querying the database, if enabled the database calls will be sectioned
and fetched in a few smaller calls, to which we need constant database
connection. We would like to change our database management
tool(pgbouncer) to transaction mode and to do that we would need to
disable that default django behaviour. The implementation only adds an
option to change it which defaults to the same behaviour as it is now.
We will change that on our side by env variables
  • Loading branch information
rafalkosla101 authored Feb 4, 2025
2 parents 247801a + b22a79a commit fdd469a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions physionet-django/physionet/settings/production.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
'PASSWORD': config('DB_PASSWORD'),
'HOST': config('DB_HOST'),
'PORT': config('DB_PORT', default=''),
'DISABLE_SERVER_SIDE_CURSORS': config('DISABLE_SERVER_SIDE_CURSORS', default=False, cast=bool),
}
}

Expand Down
1 change: 1 addition & 0 deletions physionet-django/physionet/settings/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
'PASSWORD': config('DB_PASSWORD'),
'HOST': config('DB_HOST'),
'PORT': config('DB_PORT', default=''),
'DISABLE_SERVER_SIDE_CURSORS': config('DISABLE_SERVER_SIDE_CURSORS', default=False, cast=bool),
'TEST': {
'MIRROR': 'default'
},
Expand Down
1 change: 1 addition & 0 deletions physionet-django/physionet/settings/staging.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
'PASSWORD': config('DB_PASSWORD'),
'HOST': config('DB_HOST'),
'PORT': config('DB_PORT', default=''),
'DISABLE_SERVER_SIDE_CURSORS': config('DISABLE_SERVER_SIDE_CURSORS', default=False, cast=bool),
}
}

Expand Down

0 comments on commit fdd469a

Please sign in to comment.