mirror of
https://gitlab.com/chicken-riders/RcGcDb.git
synced 2025-02-23 00:54:09 +00:00
Depend on only postid being -1 for disabled Discussion checking
This commit is contained in:
parent
10064be78d
commit
9e5166e17a
|
@ -348,7 +348,7 @@ async def discussion_handler():
|
||||||
try:
|
try:
|
||||||
while True:
|
while True:
|
||||||
fetch_all = db_cursor.execute(
|
fetch_all = db_cursor.execute(
|
||||||
'SELECT wiki, wikiid, rcid, postid FROM rcgcdw WHERE wikiid IS NOT NULL')
|
'SELECT wiki, wikiid, rcid, postid FROM rcgcdw WHERE postid > -1')
|
||||||
for db_wiki in fetch_all.fetchall():
|
for db_wiki in fetch_all.fetchall():
|
||||||
header = settings["header"]
|
header = settings["header"]
|
||||||
header["Accept"] = "application/hal+json"
|
header["Accept"] = "application/hal+json"
|
||||||
|
@ -395,7 +395,7 @@ async def discussion_handler():
|
||||||
DBHandler.update_db()
|
DBHandler.update_db()
|
||||||
continue
|
continue
|
||||||
comment_events = []
|
comment_events = []
|
||||||
targets = generate_targets(db_wiki["wiki"], "AND NOT wikiid IS NULL")
|
targets = generate_targets(db_wiki["wiki"], "AND NOT postid = -1")
|
||||||
for post in discussion_feed:
|
for post in discussion_feed:
|
||||||
if post["_embedded"]["thread"][0]["containerType"] == "ARTICLE_COMMENT" and post["id"] > db_wiki["postid"]:
|
if post["_embedded"]["thread"][0]["containerType"] == "ARTICLE_COMMENT" and post["id"] > db_wiki["postid"]:
|
||||||
comment_events.append(post["forumId"])
|
comment_events.append(post["forumId"])
|
||||||
|
|
Loading…
Reference in a new issue