comparison sat_pubsub/pgsql_storage.py @ 424:3fce48c0a44d

psql: fixed use of default value for max items in `setConfiguration`
author Goffi <goffi@goffi.org>
date Sat, 15 Aug 2020 22:53:53 +0200
parents c21f31355ab9
children 0526073ff2ab
comparison
equal deleted inserted replaced
423:af73d57829ed 424:3fce48c0a44d
528 config = copy.copy(self._config) 528 config = copy.copy(self._config)
529 529
530 for option in options: 530 for option in options:
531 if option in config: 531 if option in config:
532 config[option] = options[option] 532 config[option] = options[option]
533
534 if config[const.OPT_MAX_ITEMS] == "max":
535 # XXX: "max" is default value for config we must convert
536 # it to an interger. See backend's _doSetNodeConfiguration comment
537 config[const.OPT_MAX_ITEMS] = "0"
533 538
534 d = self.dbpool.runInteraction(self._setConfiguration, config) 539 d = self.dbpool.runInteraction(self._setConfiguration, config)
535 d.addCallback(self._setCachedConfiguration, config) 540 d.addCallback(self._setCachedConfiguration, config)
536 return d 541 return d
537 542