We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f0d715e commit 8a9253bCopy full SHA for 8a9253b
1 file changed
plain-jobs/plain/jobs/jobs.py
@@ -115,15 +115,10 @@ def run_in_worker(
115
if unique_key is None:
116
unique_key = self.get_unique_key()
117
118
- if unique_key:
119
- # Only need to look at in progress jobs
120
- # if we also have a unique key.
121
- # Otherwise it's up to the user to use _in_progress()
122
- if self._in_progress(unique_key):
123
- span.set_attribute(ERROR_TYPE, "DuplicateJob")
124
- return None
125
-
126
- # Is recording is not enough here... because we also record for summaries!
+ if unique_key and self._in_progress(unique_key):
+ span.set_attribute(ERROR_TYPE, "DuplicateJob")
+ logger.info("Job already in progress with unique_key=%s", unique_key)
+ return None
127
128
# Capture current trace context
129
current_span = trace.get_current_span()
0 commit comments