Optimize: Started work on an updated worker

This commit is contained in:
frikky
2021-01-11 18:53:17 +01:00
parent 63f8b1fda8
commit 43e228929e
10 changed files with 1306 additions and 596 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
NAME=shuffle-orborus
VERSION=0.8.51
VERSION=0.8.52
echo "Running docker build with $NAME:$VERSION"
#docker rmi frikky/shuffle:$NAME --force
+3 -3
View File
@@ -472,7 +472,7 @@ func main() {
allowed := maxConcurrency - executionCount
if len(executionRequests.Data) > allowed {
log.Printf("[WARNING] Throttle - Cutting down requests from %d to %d", len(executionRequests.Data), allowed)
log.Printf("[WARNING] Throttle - Cutting down requests from %d to %d (MAX: %d, CUR: %d)", len(executionRequests.Data), allowed, maxConcurrency, executionCount)
executionRequests.Data = executionRequests.Data[0:allowed]
}
@@ -695,7 +695,7 @@ func zombiecheck(ctx context.Context, workerTimeout int) error {
log.Printf("[INFO] Should STOP %d containers.", len(stopContainers))
for _, containername := range stopContainers {
log.Printf("[INFO] Stopping and removing container %s", containerNames[containername])
go dockercli.ContainerStop(ctx, containername, nil)
dockercli.ContainerStop(ctx, containername, nil)
removeContainers = append(removeContainers, containername)
}
@@ -706,7 +706,7 @@ func zombiecheck(ctx context.Context, workerTimeout int) error {
log.Printf("[INFO] Should REMOVE %d containers.", len(removeContainers))
for _, containername := range removeContainers {
go dockercli.ContainerRemove(ctx, containername, removeOptions)
dockercli.ContainerRemove(ctx, containername, removeOptions)
}
return nil