Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F9347777
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
View Options
diff --git a/swh/scheduler/updater/events.py b/swh/scheduler/updater/events.py
index c198ba0..bde4f4c 100644
--- a/swh/scheduler/updater/events.py
+++ b/swh/scheduler/updater/events.py
@@ -1,37 +1,37 @@
# Copyright (C) 2018 The Software Heritage developers
# See the AUTHORS file at the top-level directory of this distribution
# License: GNU General Public License version 3, or any later version
# See top-level LICENSE file for more information
LISTENED_EVENTS = [
'delete',
'public',
'push'
]
class SWHEvent:
"""SWH's interesting event (resulting in an origin update)
"""
def __init__(self, evt, rate=1):
self.event = evt
self.type = evt['type'].lower()
self.url = evt['url']
self.last_seen = evt.get('last_seen')
self.rate = rate
def is_interesting(self):
return self.type in LISTENED_EVENTS
def get(self):
return {
'type': self.type,
'url': self.url,
'last_seen': self.last_seen,
'rate': self.rate,
}
def __str__(self):
- return self.get()
+ return str(self.get())
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Jul 4 2025, 5:54 PM (4 w, 3 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3253582
Attached To
rDSCH Scheduling utilities
Event Timeline
Log In to Comment