fix: improve locking

This commit is contained in:
Ruben Fiszel
2024-04-04 01:10:38 +02:00
parent 7e5493da5e
commit 281cd7bc8b
2 changed files with 2 additions and 1 deletions
+1 -1
View File
@@ -165,7 +165,7 @@ ENV GO_PATH=/usr/local/go/bin/go
RUN apt-get -y update && apt-get install -y curl nodejs npm
# go build is slower the first time it is ran, so we prewarm it in the build
RUN mkdir -p /tmp/gobuildwarm && cd /tmp/gobuildwarm && go mod init gobuildwarm && printf "package foo\nimport (\"fmt\"\nwmill \"github.com/windmill-labs/windmill-go-client\")\nfunc main() { v := wmill.GetStatePath()\n fmt.Println(v) }" > warm.go && go mod tidy && go build -x && rm -rf /tmp/gobuildwarm
RUN mkdir -p /tmp/gobuildwarm && cd /tmp/gobuildwarm && go mod init gobuildwarm && printf "package foo\nimport (\"fmt\")\nfunc main() { fmt.Println(v) }" > warm.go && go mod tidy && go build -x && rm -rf /tmp/gobuildwarm
ENV TZ=Etc/UTC
+1
View File
@@ -166,6 +166,7 @@ pub async fn migrate(db: &DB) -> Result<(), Error> {
tracing::error!("Database had been applied more migrations than this container.
This usually mean than another container on a more recent version migrated the database and this one is on an earlier version.
Please update the container to latest. Not critical, but may cause issues if migration introduced a breaking change. Version missing: {e}");
custom_migrator.unlock().await?;
Ok(())
}
Err(err) => Err(err),