Skip to content

Commit 994920c

Browse files
silverwinddelvh
andauthored
Kill all gitea processes before air build (go-gitea#30477)
So it happened to me multiple times that air leaves zombie processes after termination. I think ultimately it's some kind of bug in air, but we can work around. The change in the delay is unrelated to the zombie processes but seems to help a bit with duplicate changes resulting in duplicate `make generate` as seen here: <img width="424" alt="Screenshot 2024-04-14 at 17 05 47" src="https://github.com/go-gitea/gitea/assets/115237/6dd1d787-6be3-4fb2-8b0b-cd711c281793"> --------- Co-authored-by: delvh <[email protected]>
1 parent 708e87e commit 994920c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

.air.toml

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@ root = "."
22
tmp_dir = ".air"
33

44
[build]
5+
pre_cmd = ["killall -9 gitea 2>/dev/null || true"] # kill off potential zombie processes from previous runs
56
cmd = "make --no-print-directory backend"
67
bin = "gitea"
7-
delay = 1000
8+
delay = 2000
89
include_ext = ["go", "tmpl"]
910
include_file = ["main.go"]
1011
include_dir = ["cmd", "models", "modules", "options", "routers", "services"]

0 commit comments

Comments
 (0)