pattern: Add first_visits_queue_prefix parameter to Lister constructor
It enables to declare a lister whose first visits of listed origins must be scheduled with high priority. Related to swh/devel/swh-scheduler#4687.
This commit is contained in:
parent
7609ebf7e1
commit
0e1093e308
2 changed files with 5 additions and 0 deletions
|
@ -189,6 +189,7 @@ def test_stateless_instantiation(swh_scheduler):
|
|||
scheduler=swh_scheduler,
|
||||
url="https://example.com",
|
||||
instance="example.com",
|
||||
first_visits_queue_prefix="test",
|
||||
)
|
||||
|
||||
# check the lister was registered in the scheduler backend
|
||||
|
@ -197,6 +198,7 @@ def test_stateless_instantiation(swh_scheduler):
|
|||
)
|
||||
assert stored_lister == lister.lister_obj
|
||||
assert stored_lister.current_state == {}
|
||||
assert stored_lister.first_visits_queue_prefix == "test"
|
||||
assert lister.state is None
|
||||
|
||||
with pytest.raises(NotImplementedError):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue