Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F9347915
D2850.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
588 B
Subscribers
None
D2850.diff
View Options
diff --git a/swh/storage/storage.py b/swh/storage/storage.py
--- a/swh/storage/storage.py
+++ b/swh/storage/storage.py
@@ -1027,9 +1027,9 @@
self.journal_writer.origin_add_one(origin)
- origins = db.origin_add(origin.url, cur)
- send_metric('origin:add', count=len(origins), method_name='origin_add')
- return origins
+ url = db.origin_add(origin.url, cur)
+ send_metric('origin:add', count=1, method_name='origin_add_one')
+ return url
@db_transaction(statement_timeout=500)
def stat_counters(self, db=None, cur=None):
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Jul 3 2025, 6:03 PM (4 w, 4 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3222234
Attached To
D2850: Don't count origins len(url) times when calling origin_add_one
Event Timeline
Log In to Comment