@@ -21,7 +21,7 @@ const (
2121 // do not scale over this amount of CPU usage
2222 maxCpuUsageForScaling = 0.8
2323 // upscale stalled threads every x milliseconds
24- upscaleCheckTime = 100 * time .Millisecond
24+ // upscaleCheckTime = 100 * time.Millisecond
2525 // downscale idle threads every x seconds
2626 downScaleCheckTime = 5 * time .Second
2727 // max amount of threads stopped in one iteration of downScaleCheckTime
3535 autoScaledThreads = []* phpThread {}
3636 scalingMu = new (sync.RWMutex )
3737
38- MaxThreadsReachedError = errors .New ("max amount of overall threads reached" )
39- CannotRemoveLastThreadError = errors .New ("cannot remove last thread" )
40- WorkerNotFoundError = errors .New ("worker not found for given filename" )
38+ ErrMaxThreadsReached = errors .New ("max amount of overall threads reached" )
39+ //ErrCannotRemoveLastThread = errors.New("cannot remove last thread")
40+ //ErrWorkerNotFound = errors.New("worker not found for given filename")
4141)
4242
4343func initAutoScaling (mainThread * phpMainThread ) {
@@ -67,7 +67,7 @@ func drainAutoScaling() {
6767func addRegularThread () (* phpThread , error ) {
6868 thread := getInactivePHPThread ()
6969 if thread == nil {
70- return nil , MaxThreadsReachedError
70+ return nil , ErrMaxThreadsReached
7171 }
7272 convertToRegularThread (thread )
7373 thread .state .waitFor (stateReady , stateShuttingDown , stateReserved )
@@ -77,7 +77,7 @@ func addRegularThread() (*phpThread, error) {
7777func addWorkerThread (worker * worker ) (* phpThread , error ) {
7878 thread := getInactivePHPThread ()
7979 if thread == nil {
80- return nil , MaxThreadsReachedError
80+ return nil , ErrMaxThreadsReached
8181 }
8282 convertToWorkerThread (thread , worker )
8383 thread .state .waitFor (stateReady , stateShuttingDown , stateReserved )
0 commit comments