Skip to content

Commit

Permalink
fixed linting errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Jessica Gamio committed Sep 18, 2024
1 parent b0d713e commit 4614bd9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
1 change: 0 additions & 1 deletion ddtrace/_trace/trace_handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
from ddtrace.internal.constants import RESPONSE_HEADERS
from ddtrace.internal.logger import get_logger
from ddtrace.internal.schema.span_attribute_schema import SpanDirection
from ddtrace.internal.utils import get_argument_value
from ddtrace.internal.utils import http as http_utils
from ddtrace.propagation.http import HTTPPropagator

Expand Down
12 changes: 5 additions & 7 deletions ddtrace/contrib/rq/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@

from ddtrace import Pin
from ddtrace import config
from ddtrace._trace.trace_handlers import _start_span
from ddtrace.constants import SPAN_KIND
from ddtrace.internal import core
from ddtrace.internal.constants import COMPONENT
Expand All @@ -92,7 +91,6 @@

from ...ext import SpanKind
from ...ext import SpanTypes
from ...propagation.http import HTTPPropagator
from .. import trace_utils


Expand Down Expand Up @@ -159,7 +157,7 @@ def traced_queue_enqueue_job(rq, pin, func, instance, args, kwargs):
JOB_ID: job.get_id(),
JOB_FUNC_NAME: job.func_name,
},
) as ctx, ctx[ctx["call_key"]] as span:
) as ctx, ctx[ctx["call_key"]] as _:
# If the queue is_async then add distributed tracing headers to the job
if instance.is_async:
core.dispatch("rq.queue.enqueue_job", [ctx, job.meta])
Expand All @@ -178,7 +176,7 @@ def traced_queue_fetch_job(rq, pin, func, instance, args, kwargs):
service=trace_utils.int_service(pin, config.rq),
call_key="traced_queue_fetch_job",
tags={COMPONENT: config.rq.integration_name, JOB_ID: job_id},
) as ctx, ctx[ctx["call_key"]] as span:
) as ctx, ctx[ctx["call_key"]] as _:
return func(*args, **kwargs)


Expand All @@ -200,7 +198,7 @@ def traced_perform_job(rq, pin, func, instance, args, kwargs):
distributed_headers_config=config.rq_worker,
distributed_headers=job.meta,
tags={COMPONENT: config.rq.integration_name, SPAN_KIND: SpanKind.CONSUMER, JOB_ID: job.get_id()},
) as ctx, ctx[ctx["call_key"]] as span:
) as ctx, ctx[ctx["call_key"]] as _:
try:
return func(*args, **kwargs)
finally:
Expand Down Expand Up @@ -231,7 +229,7 @@ def traced_job_perform(rq, pin, func, instance, args, kwargs):
call_key="job.perform",
pin=pin,
tags={COMPONENT: config.rq.integration_name, JOB_ID: job.get_id()},
) as ctx, ctx[ctx["call_key"]] as span:
) as ctx, ctx[ctx["call_key"]] as _:
return func(*args, **kwargs)


Expand All @@ -248,7 +246,7 @@ def traced_job_fetch_many(rq, pin, func, instance, args, kwargs):
call_key="job.fetch_many",
pin=pin,
tags={COMPONENT: config.rq.integration_name, JOB_ID: job_ids},
) as ctx, ctx[ctx["call_key"]] as span:
) as ctx, ctx[ctx["call_key"]] as _:
return func(*args, **kwargs)


Expand Down

0 comments on commit 4614bd9

Please sign in to comment.