add expire tool
This commit is contained in:
parent
23ae28bc71
commit
f61470468b
@ -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() {
|
||||
|
||||
|
@ -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()
|
||||
|
Reference in New Issue
Block a user