mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-29 12:02:25 -05:00
[feature] Prune timelines once per hour to plug memory leak (#1117)
* export highest/lowest ULIDs as proper const * add stop + start to timeline manager, other small fixes * unexport unused interface funcs + tidy up * add LastGot func * add timeline Prune function * test prune * update lastGot
This commit is contained in:
parent
90bbcf1bcf
commit
50dc179d33
16 changed files with 594 additions and 602 deletions
|
|
@ -351,6 +351,11 @@ func (p *processor) Start() error {
|
|||
return err
|
||||
}
|
||||
|
||||
// Start status timelines
|
||||
if err := p.statusTimelines.Start(); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
@ -359,8 +364,14 @@ func (p *processor) Stop() error {
|
|||
if err := p.clientWorker.Stop(); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if err := p.fedWorker.Stop(); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if err := p.statusTimelines.Stop(); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue