From 994920c677b04a720726d982e4d6212664b82a43 Mon Sep 17 00:00:00 2001 From: silverwind Date: Mon, 15 Apr 2024 10:24:36 +0200 Subject: [PATCH] Kill all gitea processes before air build (#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: Screenshot 2024-04-14 at 17 05 47 --------- Co-authored-by: delvh --- .air.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.air.toml b/.air.toml index de97bd8b298..3740c4d4aa3 100644 --- a/.air.toml +++ b/.air.toml @@ -2,9 +2,10 @@ root = "." tmp_dir = ".air" [build] +pre_cmd = ["killall -9 gitea 2>/dev/null || true"] # kill off potential zombie processes from previous runs cmd = "make --no-print-directory backend" bin = "gitea" -delay = 1000 +delay = 2000 include_ext = ["go", "tmpl"] include_file = ["main.go"] include_dir = ["cmd", "models", "modules", "options", "routers", "services"]