Mercurial > p > roundup > code
comparison roundup/configuration.py @ 4074:e039f3cbbb96
Make RDBMS cache-size configurable.
| author | Stefan Seefeld <stefan@seefeld.name> |
|---|---|
| date | Tue, 24 Feb 2009 01:10:13 +0000 |
| parents | a5b68d46bce8 |
| children | 34434785f308 |
comparison
equal
deleted
inserted
replaced
| 4073:145b32238093 | 4074:e039f3cbbb96 |
|---|---|
| 368 def _value2str(self, value): | 368 def _value2str(self, value): |
| 369 return oct(value) | 369 return oct(value) |
| 370 | 370 |
| 371 class NullableOption(Option): | 371 class NullableOption(Option): |
| 372 | 372 |
| 373 """Option that is set to None if it's string value is one of NULL strings | 373 """Option that is set to None if its string value is one of NULL strings |
| 374 | 374 |
| 375 Default nullable strings list contains empty string only. | 375 Default nullable strings list contains empty string only. |
| 376 There is constructor parameter allowing to specify different nullables. | 376 There is constructor parameter allowing to specify different nullables. |
| 377 | 377 |
| 378 Conversion to external representation returns the first of the NULL | 378 Conversion to external representation returns the first of the NULL |
| 590 "Name of the MySQL defaults file.\n" | 590 "Name of the MySQL defaults file.\n" |
| 591 "Only used in MySQL connections."), | 591 "Only used in MySQL connections."), |
| 592 (NullableOption, 'read_default_group', 'roundup', | 592 (NullableOption, 'read_default_group', 'roundup', |
| 593 "Name of the group to use in the MySQL defaults file (.my.cnf).\n" | 593 "Name of the group to use in the MySQL defaults file (.my.cnf).\n" |
| 594 "Only used in MySQL connections."), | 594 "Only used in MySQL connections."), |
| 595 (IntegerNumberOption, 'cache_size', '100', | |
| 596 "Size of the node cache (in elements)"), | |
| 595 ), "Settings in this section are used" | 597 ), "Settings in this section are used" |
| 596 " by Postgresql and MySQL backends only" | 598 " by RDBMS backends only" |
| 597 ), | 599 ), |
| 598 ("logging", ( | 600 ("logging", ( |
| 599 (FilePathOption, "config", "", | 601 (FilePathOption, "config", "", |
| 600 "Path to configuration file for standard Python logging module.\n" | 602 "Path to configuration file for standard Python logging module.\n" |
| 601 "If this option is set, logging configuration is loaded\n" | 603 "If this option is set, logging configuration is loaded\n" |
| 872 _options = self._get_section_options(_section) | 874 _options = self._get_section_options(_section) |
| 873 if _name not in _options: | 875 if _name not in _options: |
| 874 _options.append(_name) | 876 _options.append(_name) |
| 875 # (section, name) key is used for writing .ini file | 877 # (section, name) key is used for writing .ini file |
| 876 self.options[(_section, _name)] = option | 878 self.options[(_section, _name)] = option |
| 877 # make the option known under all of it's A.K.A.s | 879 # make the option known under all of its A.K.A.s |
| 878 for _name in option.aliases: | 880 for _name in option.aliases: |
| 879 self.options[_name] = option | 881 self.options[_name] = option |
| 880 | 882 |
| 881 def update_option(self, name, klass, | 883 def update_option(self, name, klass, |
| 882 default=NODEFAULT, description=None | 884 default=NODEFAULT, description=None |
