diff --git a/swh/storage/api/gunicorn_config.py b/swh/storage/api/gunicorn_config.py new file mode 100644 --- /dev/null +++ b/swh/storage/api/gunicorn_config.py @@ -0,0 +1,16 @@ +# Copyright (C) 2022 The Software Heritage developers +# See the AUTHORS file at the top-level directory of this distribution +# License: GNU General Public License version 3, or any later version +# See top-level LICENSE file for more information + +import functools + +import psycopg2.errors + +from swh.core.api.gunicorn_config import * # noqa +from swh.storage.exc import StorageArgumentException + +post_fork = functools.partial( + post_fork, # noqa + ignored_exceptions=(psycopg2.errors.UniqueViolation, StorageArgumentException), +)