Optimize: Started work on an updated worker
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -5,6 +5,8 @@ WORKDIR /app
|
||||
RUN go get -u github.com/docker/docker/api/types
|
||||
RUN go get -u github.com/docker/docker/api/types/container
|
||||
RUN go get -u github.com/docker/docker/client
|
||||
RUN go get -u github.com/gorilla/mux
|
||||
RUN go get -u github.com/patrickmn/go-cache
|
||||
|
||||
COPY worker.go /app/worker.go
|
||||
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o worker .
|
||||
@@ -13,7 +15,7 @@ FROM alpine:3.12
|
||||
|
||||
ENV SHUFFLE_BASE_IMAGE_REGISTRY=docker.io
|
||||
ENV SHUFFLE_BASE_IMAGE_NAME=frikky/shuffle
|
||||
ENV SHUFFLE_BASE_IMAGE_TAG_SUFFIX=0.6.0
|
||||
ENV SHUFFLE_BASE_IMAGE_TAG_SUFFIX=0.8.5
|
||||
|
||||
RUN apk add --no-cache bash
|
||||
COPY --from=builder /app/ /
|
||||
|
||||
@@ -9,4 +9,5 @@ docker build . -t frikky/shuffle:$NAME -t frikky/shuffle:$NAME_$VERSION -t docke
|
||||
#docker push frikky/$NAME:$VERSION
|
||||
#docker push frikky/shuffle:$NAME_$VERSION
|
||||
#docker push docker.pkg.github.com/frikky/shuffle/$NAME:$VERSION
|
||||
docker tag frikky/shuffle:0.8.51 ghcr.io/frikky/shuffle-worker:0.8.5
|
||||
docker push ghcr.io/frikky/$NAME:$VERSION
|
||||
|
||||
+1246
-529
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user