21 lines
388 B
Go
21 lines
388 B
Go
package processing
|
|
|
|
import (
|
|
"sync"
|
|
"time"
|
|
|
|
"github.com/spf13/viper"
|
|
)
|
|
|
|
var semaphore chan struct{}
|
|
var swg *sync.WaitGroup
|
|
//Used to determine if a task was started by a previous instance that stalled out or died
|
|
var startup time.Time
|
|
|
|
func Setup(wg *sync.WaitGroup) {
|
|
semaphore = make(chan struct{}, viper.GetInt("processing.maxparallel"))
|
|
startup = time.Now()
|
|
}
|
|
|
|
func Submit()
|
|
|