Remove special support for celery from sitecustomize
This is not required anymore after merging
# See the License for the specific language governing permissions and
# limitations under the License.
-import sys
from logging import getLogger
-from os import environ, path
+from os import environ
from os.path import abspath, dirname, pathsep
from re import sub
@@ -125,17 +124,4 @@ def initialize():
)
-if (
- hasattr(sys, "argv")
- and sys.argv[0].split(path.sep)[-1] == "celery"
- and "worker" in sys.argv[1:]
-):
- from celery.signals import worker_process_init # pylint:disable=E0401
-
- @worker_process_init.connect(weak=False)
- def init_celery(*args, **kwargs):
- initialize()
-
-
-else:
initialize()
