Pin the search in demo mode

Signed-off-by: Hadi <112569860+anotherhadi@users.noreply.github.com>
This commit is contained in:
Hadi
2026-04-10 23:38:27 +02:00
parent 3b75d945c4
commit f30c386fbf
3 changed files with 6 additions and 0 deletions

View File

@@ -131,6 +131,9 @@ func (m *Manager) purgeExpired() {
m.mu.Lock()
defer m.mu.Unlock()
for id, s := range m.searches {
if s.pinned {
continue // demo/pinned searches are never purged
}
ft := s.FinishedAt()
if ft.IsZero() {
continue // still running