diff --git a/contrib/backends/srndv2/src/srnd/daemon.go b/contrib/backends/srndv2/src/srnd/daemon.go index 0166510..9445631 100644 --- a/contrib/backends/srndv2/src/srnd/daemon.go +++ b/contrib/backends/srndv2/src/srnd/daemon.go @@ -488,6 +488,12 @@ func (self *NNTPDaemon) syncPull(proxy_type, proxy_addr, remote_addr string) { } } +func (self *NNTPDaemon) ExpireAll() { + log.Println("expiring all orphans") + self.expire = createExpirationCore(self.database, self.store, self.informHooks) + self.expire.ExpireOrphans() +} + // run daemon func (self *NNTPDaemon) Run() { diff --git a/contrib/backends/srndv2/srnd.go b/contrib/backends/srndv2/srnd.go index d2cbc23..f8c5848 100644 --- a/contrib/backends/srndv2/srnd.go +++ b/contrib/backends/srndv2/srnd.go @@ -94,6 +94,9 @@ func main() { } else { fmt.Fprintf(os.Stdout, "usage: %s tool mod [[add|del] pubkey]|[do modactiongoeshere]\n", os.Args[0]) } + } else if tool == "expire" { + daemon.Setup() + daemon.ExpireAll() } else if tool == "rethumb" { if len(os.Args) >= 4 { threads := runtime.NumCPU()