Skip to content

Commit 8a9253b

Browse files
committed
Info log on unique_key job in progress
1 parent f0d715e commit 8a9253b

1 file changed

Lines changed: 4 additions & 9 deletions

File tree

plain-jobs/plain/jobs/jobs.py

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -115,15 +115,10 @@ def run_in_worker(
115115
if unique_key is None:
116116
unique_key = self.get_unique_key()
117117

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!
118+
if unique_key and self._in_progress(unique_key):
119+
span.set_attribute(ERROR_TYPE, "DuplicateJob")
120+
logger.info("Job already in progress with unique_key=%s", unique_key)
121+
return None
127122

128123
# Capture current trace context
129124
current_span = trace.get_current_span()

0 commit comments

Comments
 (0)