System: Debian/Ubuntu/Fedora. Might work for others as well.
As mentioned here, to update a go version you will first need to uninstall the original version.
To uninstall, delete the /usr/local/go
directory by:
func sleepForWait(t time.Duration) { | |
for startTime := time.Now(); time.Since(startTime) < t; time.Sleep(10 * time.Second) { | |
if !*IsCampaigRunning { | |
// We use logrus for logging | |
logrus.Info("LEFT SLEEPING !!! IMMEDIATELY STOPING CAMPAIGNS PROCESSING") | |
return | |
} | |
} | |
} |
// sleep function is updated as below | |
func sleepForWait(ctx context.Context,t time.Duration) { | |
select { | |
case <-ctx.Done(): | |
return | |
case <-time.After(t): | |
return | |
} | |
} |
#FROM python:3.9-slim-bullseye | |
ENV VIRTUAL_ENV=/opt/venv | |
RUN python3 -m venv $VIRTUAL_ENV | |
ENV PATH="$VIRTUAL_ENV/bin:$PATH" | |
# Install dependencies: | |
#COPY requirements.txt . | |
#RUN pip install -r requirements.txt |
System: Debian/Ubuntu/Fedora. Might work for others as well.
As mentioned here, to update a go version you will first need to uninstall the original version.
To uninstall, delete the /usr/local/go
directory by:
https://lindevs.com/install-protoc-on-ubuntu |