mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-29 14:52:26 -05:00
[feature/performance] Store account stats in separate table (#2831)
* [feature/performance] Store account stats in separate table, get stats from remote * test account stats * add some missing increment / decrement calls * change stats function signatures * rejig logging a bit * use lock when updating stats
This commit is contained in:
parent
f79d50b9b2
commit
3cceed11b2
43 changed files with 1285 additions and 450 deletions
|
|
@ -49,7 +49,7 @@ func (p *Processor) AccountApprove(
|
|||
// Get a lock on the account URI,
|
||||
// to ensure it's not also being
|
||||
// rejected at the same time!
|
||||
unlock := p.state.ClientLocks.Lock(user.Account.URI)
|
||||
unlock := p.state.AccountLocks.Lock(user.Account.URI)
|
||||
defer unlock()
|
||||
|
||||
if !*user.Approved {
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ func (p *Processor) AccountReject(
|
|||
// Get a lock on the account URI,
|
||||
// since we're going to be deleting
|
||||
// it and its associated user.
|
||||
unlock := p.state.ClientLocks.Lock(user.Account.URI)
|
||||
unlock := p.state.AccountLocks.Lock(user.Account.URI)
|
||||
defer unlock()
|
||||
|
||||
// Can't reject an account with a
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue