mirror of
https://github.com/muety/wakapi.git
synced 2023-08-10 21:12:56 +03:00
refactor: use job queue for data imports
This commit is contained in:
@@ -15,6 +15,7 @@ const (
|
||||
QueueDefault = "wakapi.default"
|
||||
QueueProcessing = "wakapi.processing"
|
||||
QueueReports = "wakapi.reports"
|
||||
QueueImports = "wakapi.imports"
|
||||
)
|
||||
|
||||
type JobQueueMetrics struct {
|
||||
@@ -29,6 +30,7 @@ func init() {
|
||||
InitQueue(QueueDefault, 1)
|
||||
InitQueue(QueueProcessing, int(math.Ceil(float64(runtime.NumCPU())/2.0)))
|
||||
InitQueue(QueueReports, 1)
|
||||
InitQueue(QueueImports, 1)
|
||||
}
|
||||
|
||||
func InitQueue(name string, workers int) error {
|
||||
|
Reference in New Issue
Block a user