mirror of
https://github.com/superseriousbusiness/gotosocial
synced 2025-06-05 21:59:39 +02:00
[feature] Allow import of following and blocks via CSV (#3150)
* [feature] Import follows + blocks via settings panel * test import follows
This commit is contained in:
@@ -49,6 +49,11 @@ type Workers struct {
|
||||
// for asynchronous dereferencer jobs.
|
||||
Dereference FnWorkerPool
|
||||
|
||||
// Processing provides a worker pool
|
||||
// for asynchronous processing jobs,
|
||||
// eg., import tasks, admin tasks.
|
||||
Processing FnWorkerPool
|
||||
|
||||
// prevent pass-by-value.
|
||||
_ nocopy
|
||||
}
|
||||
@@ -81,6 +86,10 @@ func (w *Workers) Start() {
|
||||
n = 4 * maxprocs
|
||||
w.Dereference.Start(n)
|
||||
log.Infof(nil, "started %d dereference workers", n)
|
||||
|
||||
n = 4 * maxprocs
|
||||
w.Processing.Start(n)
|
||||
log.Infof(nil, "started %d processing workers", n)
|
||||
}
|
||||
|
||||
// Stop will stop all of the contained
|
||||
@@ -101,6 +110,9 @@ func (w *Workers) Stop() {
|
||||
|
||||
w.Dereference.Stop()
|
||||
log.Info(nil, "stopped dereference workers")
|
||||
|
||||
w.Processing.Stop()
|
||||
log.Info(nil, "stopped processing workers")
|
||||
}
|
||||
|
||||
// nocopy when embedded will signal linter to
|
||||
|
Reference in New Issue
Block a user