- Feb 01, 2019
-
-
David Douard authored
-
vlorentz authored
`entry_to_bytes` and its friends were called many times (eg. entry_to_bytes alone was called 40k times while indexing 500 origins with the metadata indexer), and its use of `isinstance` used a non-negligible amount of CPU time. Instead of using `*_to_bytes` function as post-processing on all bits of data returned by postgresql, this patch tells psycopg2 to use a new `typecast_bytea` function when needed (in `adapt_conn`). This function deffers the decoding work to psycopg2, which returns a `memoryview`, which is turned into `bytes`.
-
David Douard authored
to keep the copy_to API bw compatible.
-
David Douard authored
This needs tests!
-
- Jan 31, 2019
-
-
David Douard authored
so thath it does not fail if no payload at all is provided in the request, eg. for an endpoint which really is (or at least should be) a simple GET...
-
David Douard authored
just to make our life a bit easier...
-
- Jan 30, 2019
-
-
David Douard authored
so one can use this method with default values for some columns. This is used for example in scheduler.
-
- Jan 29, 2019
-
-
David Douard authored
it is not a 'private' method. Add a _cursor alias for bw compat.
-
David Douard authored
There is no need for it to be declared there: it does not use any closure and defining a function in a function is expensive!
-
David Douard authored
so that we do have to manage yet another dependecy; the code is small and has not been modified for years.
-
David Douard authored
-
David Douard authored
that recursively merge 2 (config) dictionaries. This is meant to be used to simplify a bit the config system of several systems of the swh platform (related to T1410 and T826).
-
- Jan 28, 2019
-
-
David Douard authored
-
David Douard authored
and raise logging level when loading a config file to info.
-
- Jan 24, 2019
-
-
David Douard authored
This class is meant to be used not only to wrap storage-like db. Also rewrite the test_logger using pytest-postgresql fixture so we do not need pifpaf anymore.
-
- Jan 23, 2019
-
-
David Douard authored
Using these 2 negotiate formatters, it is possible to write Flask endpoints as: from flask import Flask from negotiate.flask import negotiate from swh.core.api import JSONFormatter, MshpackFormatter app = Flask() @app.route('/somewhere') @negotiate(MsgpackFormatter) @negotiate(JSONFormatter) def somewhere(): return {'some': 'content'} See https://github.com/nickstenning/negotiate
-
- Jan 09, 2019
-
- Dec 21, 2018
-
-
Nicolas Dandrimont authored
prometheus-statsd-exporter uses the datadog format for its tags, so base our client on their Python code, with the following modifications: - Removed python < 3.5 compat code - trimmed the imports down to be a single module - move to time.monotonic() instead of time.time() - adjust some options: - drop unix socket connection option - add environment variable support for setting the statsd host and port (pulled the idea from the main python statsd module) - only send timer metrics in milliseconds (that's what prometheus-statsd-exporter expects) - drop DataDog-specific metric types (that are unsupported in prometheus-statsd-exporter) - made the tags a dict instead of a list (prometheus-statsd-exporter only supports tags with a value, mirroring prometheus) - improve unit test coverage - documentation cleanup
-
- Dec 17, 2018
-
- Dec 14, 2018
-
-
Antoine R. Dumont authored
Related D816?id=2603#inline-4587
-
Antoine R. Dumont authored
-
Antoine R. Dumont authored
-
Antoine R. Dumont authored
-
Antoine R. Dumont authored
The first time, the db will be initialized. The next time this is called, this will do nothing.
-
Antoine R. Dumont authored
-
- Dec 13, 2018
-
-
Antoine R. Dumont authored
-
Antoine R. Dumont authored
-
- Dec 08, 2018
-
-
Antoine R. Dumont authored
-
Antoine R. Dumont authored
-
- Dec 07, 2018
-
-
Antoine R. Dumont authored
Loader-tar defines a utils.grouper as well whose sole difference is the need for the fillvalue definition to a tuple of (None, None). This will allow to use that main function instead. Related T1411
-
- Nov 26, 2018
-
-
Nicolas Dandrimont authored
-
- Nov 23, 2018
-
-
David Douard authored
related to T1330
-
- Nov 08, 2018
-
-
David Douard authored
-
- Nov 06, 2018
-
-
Nicolas Dandrimont authored
-
- Nov 05, 2018
-
-
vlorentz authored
Summary: PendingDeprecationWarning: encoding is deprecated, Use raw=False instead. Reviewers: #reviewers, zack Reviewed By: #reviewers, zack Subscribers: zack, olasd, swh-public-ci Differential Revision: https://forge.softwareheritage.org/D628
-
- Oct 25, 2018
-
-
vlorentz authored
Summary: DbTestFixture.setupClass reads `cls._DB_DUMP_LIST`, which is set by `cls.add_db`, so `cls.add_db` should be called by the child's `setupClass` beforehand Reviewers: #reviewers, ardumont Reviewed By: #reviewers, ardumont Subscribers: ardumont, swh-public-ci Differential Revision: https://forge.softwareheritage.org/D603
-
- Oct 24, 2018
-
-
David Douard authored
-
- Oct 23, 2018
-
-
Nicolas Dandrimont authored
-
Stefano Zacchiroli authored
... and make flake8 happy that way
-
- Oct 18, 2018
-
-
Nicolas Dandrimont authored
-