Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F7123085
D6147.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
896 B
Subscribers
None
D6147.diff
View Options
diff --git a/swh/scheduler/backend.py b/swh/scheduler/backend.py
--- a/swh/scheduler/backend.py
+++ b/swh/scheduler/backend.py
@@ -429,7 +429,16 @@
)
elif policy == "origins_without_last_update":
where_clauses.append("last_update IS NULL")
- order_by = "origin_visit_stats.next_visit_queue_position nulls first"
+ order_by = ", ".join(
+ [
+ # By default, sort using the queue position. If the queue
+ # position is null, then the origin has never been visited,
+ # which we want to handle first
+ "origin_visit_stats.next_visit_queue_position nulls first",
+ # Schedule unknown origins in the order we've seen them
+ "listed_origins.first_seen",
+ ]
+ )
# fmt: off
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Dec 17, 8:30 PM (6 d, 19 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3228841
Attached To
D6147: Refine scheduling policy for origins with no known last update
Event Timeline
Log In to Comment