Remove special support for celery from sitecustomize (#799)

This is not required anymore after merging https://github.com/open-telemetry/opentelemetry-python/pull/2242
This commit is contained in:
Owais Lone
2021-11-10 17:17:36 +05:30
committed by GitHub
parent 760673fc45
commit f4d09f956a

View File

@ -12,9 +12,8 @@
# 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()
initialize()