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 }