Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F9696468
D8755.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
D8755.diff
View Options
diff --git a/swh/indexer/indexer.py b/swh/indexer/indexer.py
--- a/swh/indexer/indexer.py
+++ b/swh/indexer/indexer.py
@@ -344,6 +344,9 @@
sentry_sdk.capture_exception()
summary["status"] = "failed"
return summary
+ else:
+ # Reset tag after we finished processing the given content
+ sentry_sdk.set_tag("swh-indexer-content-sha1", "")
summary_persist = self.persist_index_computations(results)
self.results = results
@@ -406,6 +409,9 @@
self.log.exception("Problem when reading contents metadata.")
sentry_sdk.capture_exception()
summary["status"] = "failed"
+ else:
+ # Reset tag after we finished processing the given content
+ sentry_sdk.set_tag("swh-indexer-content-sha1", "")
return summary
@@ -493,6 +499,7 @@
continue
sentry_sdk.set_tag("swh-indexer-content-sha1", sha1)
yield from self.index(sha1, raw_content, **kwargs)
+ sentry_sdk.set_tag("swh-indexer-content-sha1", "")
def _index_with_skipping_already_done(
self, partition_id: int, nb_partitions: int
@@ -642,6 +649,7 @@
for origin in origins:
sentry_sdk.set_tag("swh-indexer-origin-url", origin.url)
results.extend(self.index(origin.url, **kwargs))
+ sentry_sdk.set_tag("swh-indexer-origin-url", "")
return results
@@ -710,6 +718,8 @@
self.log.exception("Problem when processing directory")
sentry_sdk.capture_exception()
summary["status"] = "failed"
+ else:
+ sentry_sdk.set_tag("swh-indexer-directory-swhid", "")
summary_persist = self.persist_index_computations(results)
if summary_persist:
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Aug 17, 8:07 PM (20 h, 12 m ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3231011
Attached To
D8755: Reset Sentry tags when leaving an object's context
Event Timeline
Log In to Comment