mirror of
https://github.com/open-telemetry/opentelemetry-python-contrib.git
synced 2025-07-30 21:56:07 +08:00
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:
@ -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()
|
||||
|
Reference in New Issue
Block a user