Mercurial > p > roundup > code
comparison roundup/admin.py @ 7687:4dda4a9dfe0b
doc: add comment on method to set savepoint_limit dynamically
savepoint_limit isn't a real config option as in config.ini. I
generate one on the fly for use in the backend during import.
While this is arguably a valid config option, it is also something
that is niche (import a tracker to postgres) and adds clutter to
config.ini.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Sun, 29 Oct 2023 13:18:36 -0400 |
| parents | 5b41018617f2 |
| children | b2dbab2b34bc |
comparison
equal
deleted
inserted
replaced
| 7686:a27f30709d46 | 7687:4dda4a9dfe0b |
|---|---|
| 1056 csv.field_size_limit(self.db.config.CSV_FIELD_SIZE) | 1056 csv.field_size_limit(self.db.config.CSV_FIELD_SIZE) |
| 1057 | 1057 |
| 1058 # default value is 10000, only go through this if default | 1058 # default value is 10000, only go through this if default |
| 1059 # is different. | 1059 # is different. |
| 1060 if self.settings['savepoint_limit'] != 10000: | 1060 if self.settings['savepoint_limit'] != 10000: |
| 1061 # create a new option on the fly in the config under the | |
| 1062 # rdbms section. It is used by the postgresql backend's | |
| 1063 # checkpoint_data method. | |
| 1061 self.db.config.add_option(Option(self.db.config, | 1064 self.db.config.add_option(Option(self.db.config, |
| 1062 "rdbms", "savepoint_limit")) | 1065 "rdbms", "savepoint_limit")) |
| 1063 self.db.config.options["RDBMS_SAVEPOINT_LIMIT"].set( | 1066 self.db.config.options["RDBMS_SAVEPOINT_LIMIT"].set( |
| 1064 self.settings['savepoint_limit']) | 1067 self.settings['savepoint_limit']) |
| 1065 | 1068 |
