From 35629a09200af0b7d6592c3996121b9d8d10975a Mon Sep 17 00:00:00 2001 From: Ted Unangst Date: Tue, 29 Oct 2019 19:23:07 -0400 Subject: [PATCH] real world indicates we need to go farther back... --- database.go | 2 +- web.go | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/database.go b/database.go index 861a003..306c074 100644 --- a/database.go +++ b/database.go @@ -749,7 +749,7 @@ func prepareStatements(db *sql.DB) { stmtGetDoovers = preparetodie(db, "select dooverid, dt from doovers") stmtLoadDoover = preparetodie(db, "select tries, userid, rcpt, msg from doovers where dooverid = ?") stmtZapDoover = preparetodie(db, "delete from doovers where dooverid = ?") - stmtUntagged = preparetodie(db, "select xid, rid, flags from (select honkid, xid, rid, flags from honks where userid = ? order by honkid desc limit 2000) order by honkid asc") + stmtUntagged = preparetodie(db, "select xid, rid, flags from (select honkid, xid, rid, flags from honks where userid = ? order by honkid desc limit 10000) order by honkid asc") stmtFindZonk = preparetodie(db, "select zonkerid from zonkers where userid = ? and name = ? and wherefore = 'zonk'") stmtGetZonkers = preparetodie(db, "select zonkerid, name, wherefore from zonkers where userid = ? and wherefore <> 'zonk'") stmtSaveZonker = preparetodie(db, "insert into zonkers (userid, name, wherefore) values (?, ?, ?)") diff --git a/web.go b/web.go index 2d40ac5..0e128b8 100644 --- a/web.go +++ b/web.go @@ -1115,7 +1115,10 @@ func zonkit(w http.ResponseWriter, r *http.Request) { log.Printf("error untagging: %s", err) } } - untagged.Clear(userinfo.UserID) + var badparents map[string]bool + untagged.GetAndLock(userinfo.UserID, &badparents) + badparents[what] = true + untagged.Unlock() return }