# HG changeset patch # User RhodeCode Admin # Date 2023-05-11 10:05:22 # Node ID 7f6920cead73260b4a22bef2a8f41ae25999a9a1 # Parent b99666161714a968dd5fe05fe6ed8ce55d56ef59 celery: use just one instance of UNSET() object diff --git a/rhodecode/lib/celerylib/loader.py b/rhodecode/lib/celerylib/loader.py --- a/rhodecode/lib/celerylib/loader.py +++ b/rhodecode/lib/celerylib/loader.py @@ -246,7 +246,10 @@ class UNSET(object): pass -def set_celery_conf(app=UNSET(), root=UNSET(), request=UNSET(), registry=UNSET(), closer=UNSET()): +_unset = UNSET() + + +def set_celery_conf(app=_unset, root=_unset, request=_unset, registry=_unset, closer=_unset): if request is not UNSET: celery_app.conf.update({'PYRAMID_REQUEST': request})