Closed szarykott closed 1 year ago
Awesome! I look forward to trying this new feature out.
@ricardomaraschini I also added one more commit regarding "time management" - it uses time that comes from the ticker as now. This makes the tests more readable and resemble the real application more as in both cases "now" comes from the same source code-wise. Please review.
Merged, excellent work.
I still did not implement parsing cooldown as 1m30s
! This was a great idea, I just did not have time to implement it last week. Do you want me to submit another pull request?
@szarykott Absolutely!
Rationale
OOMHero
would send a signal to a process every second. This could overload some systems. I want to add a cooldown feature to limit how often signals are sent. It was inspired by work by @rtclauss on one of the forks, I cherry-picked his commit and based my work on it, therefore he is visible in the commit history.Functionality-wise this change is backward compatible - pulling a new version of
OOMHero
would not change the observed behavior of it if an old configuration was used, due to thecooldown
default being 1 second.What this PR contains
os.Process
behindproc.Process
interface for the main application and creating mock implementationTestProcesses
for teststestify
to have nice-to-read assertsTestProcesses