Archived
1
0

add expire tool

This commit is contained in:
Jeff Becker 2017-08-08 18:45:51 -04:00
parent 23ae28bc71
commit f61470468b
2 changed files with 9 additions and 0 deletions

View File

@ -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 // run daemon
func (self *NNTPDaemon) Run() { func (self *NNTPDaemon) Run() {

View File

@ -94,6 +94,9 @@ func main() {
} else { } else {
fmt.Fprintf(os.Stdout, "usage: %s tool mod [[add|del] pubkey]|[do modactiongoeshere]\n", os.Args[0]) 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" { } else if tool == "rethumb" {
if len(os.Args) >= 4 { if len(os.Args) >= 4 {
threads := runtime.NumCPU() threads := runtime.NumCPU()