fix: catch sandbox pool exits in analyze_all background Task
Some checks failed
Build and Push / Build and Push Docker Image (push) Has been cancelled
Some checks failed
Build and Push / Build and Push Docker Image (push) Has been cancelled
The ANALYZE queries run via Task.Supervised which doesn't hold sandbox ownership. rescue only catches exceptions; sandbox-pool checkout failures come as exit signals. Add catch :exit so the Task logs a warning instead of crashing.
This commit is contained in:
parent
32818d5866
commit
56b724b5a4
1 changed files with 3 additions and 0 deletions
|
|
@ -197,6 +197,9 @@ defmodule Microwaveprop.Weather do
|
||||||
Logger.info("Weather.analyze_all: ANALYZE #{t} done in #{elapsed}ms")
|
Logger.info("Weather.analyze_all: ANALYZE #{t} done in #{elapsed}ms")
|
||||||
rescue
|
rescue
|
||||||
e -> Logger.warning("Weather.analyze_all: ANALYZE #{t} failed: #{inspect(e)}")
|
e -> Logger.warning("Weather.analyze_all: ANALYZE #{t} failed: #{inspect(e)}")
|
||||||
|
catch
|
||||||
|
:exit, reason ->
|
||||||
|
Logger.warning("Weather.analyze_all: ANALYZE #{t} sandbox exit: #{inspect(reason)}")
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue