mirror of
https://gitlab.com/chicken-riders/RcGcDb.git
synced 2025-02-23 00:54:09 +00:00
Fix issue with wikis not being added properly to the queue
This commit is contained in:
parent
a44799dff3
commit
fcdf6b66cf
|
@ -50,8 +50,8 @@ class LimitedList(list):
|
||||||
def __init__(self, *args):
|
def __init__(self, *args):
|
||||||
list.__init__(self, *args)
|
list.__init__(self, *args)
|
||||||
|
|
||||||
def append(self, obj: QueuedWiki) -> None:
|
def append(self, obj: QueuedWiki, forced: bool = False) -> None:
|
||||||
if len(self) < queue_limit:
|
if len(self) < queue_limit or forced:
|
||||||
self.insert(len(self), obj)
|
self.insert(len(self), obj)
|
||||||
return
|
return
|
||||||
raise ListFull
|
raise ListFull
|
||||||
|
@ -174,6 +174,8 @@ class RcQueue:
|
||||||
current_domain["irc"].updated.remove(db_wiki["wiki"])
|
current_domain["irc"].updated.remove(db_wiki["wiki"])
|
||||||
except KeyError:
|
except KeyError:
|
||||||
pass # this is to be expected when third condition is not met above
|
pass # this is to be expected when third condition is not met above
|
||||||
|
current_domain["query"].append(QueuedWiki(db_wiki["wiki"], 20), forced=True) # avoid the queue limit and ROWID logic
|
||||||
|
continue
|
||||||
if not db_wiki["ROWID"] < current_domain["last_rowid"]:
|
if not db_wiki["ROWID"] < current_domain["last_rowid"]:
|
||||||
current_domain["query"].append(QueuedWiki(db_wiki["wiki"], 20))
|
current_domain["query"].append(QueuedWiki(db_wiki["wiki"], 20))
|
||||||
except KeyError:
|
except KeyError:
|
||||||
|
|
Loading…
Reference in a new issue