Make postgresql's Storage client options configurable from config
Adding a query_options
member to postgresql's Storage, in conjunction
with swh.core >= 2.5, allows to set/overwrite SQL client options from
the storage configuration file.
Default values are set, as they used to be, from the decorator arguments. But in addition to this, one can overload these value at run time from the storage configuration file. For example:
.. code-block:: yaml
storage: cls: postgresql db: testdb objstorage: cls: memory query_options: directory_ls: statement_timeout: 180000
will provide a Storage instance for which the timeout value for the
directory_ls
endpoint is 3mn (instead of the default 20s).
See swh-core!258 (closed) for the swh.core counter part needed for this feature.
Migrated from D7473 (view on Phabricator)