mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-10 07:27:29 -06:00
Add Web Push sender (similar to email sender)
This commit is contained in:
parent
0cffb8784e
commit
0c92f9f0f3
16 changed files with 699 additions and 1 deletions
|
|
@ -54,6 +54,10 @@ type Workers struct {
|
|||
// eg., import tasks, admin tasks.
|
||||
Processing FnWorkerPool
|
||||
|
||||
// WebPush provides a worker pool for
|
||||
// delivering Web Push notifications.
|
||||
WebPush FnWorkerPool
|
||||
|
||||
// prevent pass-by-value.
|
||||
_ nocopy
|
||||
}
|
||||
|
|
@ -90,6 +94,10 @@ func (w *Workers) Start() {
|
|||
n = maxprocs
|
||||
w.Processing.Start(n)
|
||||
log.Infof(nil, "started %d processing workers", n)
|
||||
|
||||
n = maxprocs
|
||||
w.WebPush.Start(n)
|
||||
log.Infof(nil, "started %d Web Push workers", n)
|
||||
}
|
||||
|
||||
// Stop will stop all of the contained
|
||||
|
|
@ -113,6 +121,9 @@ func (w *Workers) Stop() {
|
|||
|
||||
w.Processing.Stop()
|
||||
log.Info(nil, "stopped processing workers")
|
||||
|
||||
w.WebPush.Stop()
|
||||
log.Info(nil, "stopped WebPush workers")
|
||||
}
|
||||
|
||||
// nocopy when embedded will signal linter to
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue