An open API service indexing awesome lists of open source software.

https://github.com/civilcode/beam-shutdown

Demonstrates the shutdown of the beam
https://github.com/civilcode/beam-shutdown

Last synced: over 1 year ago
JSON representation

Demonstrates the shutdown of the beam

Awesome Lists containing this project

README

          

# Umb

This is an umbrella containing 2 applications: A and B.

It's been created to check what happens when we send `SIGTERM` to the `BEAM`.

Here, we've setup application A, which depends on application B.

Both applications contains long running processes setup using GenServer.

We want to delay shutting down of the application A and give it time to clean up. To do that we
setup shutdown timeout, trap exit and setup `terminate` callback to be called on shutdown. Part of the
clean up step is to send message to application B.

Result: we successfully receive an answer.

To send `SIGTERM` signal:

```
ps ax | grep beam
kill -s TERM beam_pid
```