Skip to content

Commit

Permalink
Remove special support for celery from sitecustomize (open-telemetry#799
Browse files Browse the repository at this point in the history
)

This is not required anymore after merging open-telemetry/opentelemetry-python#2242
  • Loading branch information
owais authored Nov 10, 2021
1 parent 760673f commit f4d09f9
Showing 1 changed file with 2 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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()

0 comments on commit f4d09f9

Please sign in to comment.