consume activities in a goroutine other than the web handler
This commit is contained in:
parent
c0303a91e6
commit
d8d439e596
2 changed files with 8 additions and 4 deletions
|
@ -429,6 +429,13 @@ func newphone(a []string, obj map[string]interface{}) []string {
|
|||
return a
|
||||
}
|
||||
|
||||
func consumeactivity(user *WhatAbout, j interface{}, origin string) {
|
||||
xonk := xonkxonk(user, j, origin)
|
||||
if xonk != nil {
|
||||
savexonk(user, xonk)
|
||||
}
|
||||
}
|
||||
|
||||
func xonkxonk(user *WhatAbout, item interface{}, origin string) *Honk {
|
||||
depth := 0
|
||||
maxdepth := 4
|
||||
|
|
5
honk.go
5
honk.go
|
@ -358,10 +358,7 @@ func inbox(w http.ResponseWriter, r *http.Request) {
|
|||
}
|
||||
}
|
||||
default:
|
||||
xonk := xonkxonk(user, j, origin)
|
||||
if xonk != nil {
|
||||
savexonk(user, xonk)
|
||||
}
|
||||
go consumeactivity(user, j, origin)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue