Closed barrelltech closed 3 months ago
Was about to report the same issue. I do like that it wants to clean up unused ecto_watch triggers, though. Unfortunately if I run it with the environment variable set, it doesn't seem to do anything.
Ah, shit 😅 Looking at this now!
Ok, thanks for this! ❤️
I tested this in an external app, but I didn't have tests for it 🤦 (annoying because I was making tests for everything else...)
So the error log was showing the correct triggers that needed to be cleaned up, but not the right functions. It was looking for the ew_
prefix for triggers, but not functions. I've made some tests to check that it's reporting the right triggers + functions and fixed that issue.
Also, because I started up just cleaning triggers the environment variable that the code was looking for was ECTO_WATCH_CLEANUP_TRIGGERS
, but soon after I changed the variable to ECTO_WATCH_CLEANUP
because it was also looking for functions. Unfortunately while I changed the documentation to ECTO_WATCH_CLEANUP
, I didn't change the code... That's been fixed now (along with tests that are making sure that the right triggers / functions are being cleaned up)
That's been released as 0.9.10
. Please let me know how that works!
I get a massive wall of red now any time I start my server because all my existing triggers are belong to
EctoWatch
. v0.9.5