https://github.com/derekkraan/vigilant
Vigilant keeps watch over your processes.
https://github.com/derekkraan/vigilant
Last synced: 3 months ago
JSON representation
Vigilant keeps watch over your processes.
- Host: GitHub
- URL: https://github.com/derekkraan/vigilant
- Owner: derekkraan
- Created: 2018-07-30T11:04:11.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-04-29T06:35:18.000Z (over 6 years ago)
- Last Synced: 2025-06-26T21:05:14.407Z (4 months ago)
- Language: Elixir
- Homepage:
- Size: 14.6 KB
- Stars: 13
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Vigilant
Vigilant keeps watch over your processes and kills them if they misbehave.
Examples:
```elixir
# limit memory of process to 5mb
:ok = Vigilant.limit_memory(self(), 5)# equivalent to
:ok = Vigilant.limit_memory(5)
# enforce a timeout
Vigilant.enforce_timeout(fn ->
Process.sleep(10000000000)
end, 1000, fn ->
Logger.debug("process killed because timeout was exceeded")
end)
```## Installation
If [available in Hex](https://hex.pm/docs/publish), the package can be installed
by adding `vigilant` to your list of dependencies in `mix.exs`:```elixir
def deps do
[
{:vigilant, "~> 0.1.0"}
]
end
```Documentation can be generated with [ExDoc](https://github.com/elixir-lang/ex_doc)
and published on [HexDocs](https://hexdocs.pm). Once published, the docs can
be found at [https://hexdocs.pm/vigilant](https://hexdocs.pm/vigilant).