Rename everything to Medera instead of SlackIngestor - the name of the repo should match the name of the application.
Move namespaced modules into a subdirectory - Foo.Bar should be in lib/foo/bar.ex.
Get the API token at run time. It was a module attribute before (@token) - module attributes are determined at compile time. I.e., if we had specified token1 during compile and token2 during a run, token1 would have been used. Also raise an error if the token is not specified, since otherwise the code would fail in less obvious ways.
Start Medera.Consumer directly under the supervision tree. It's better to have long-running processes running under the supervision tree than to link them to another child process. If you want those two processes to be linked separately from other processes, then give them their own separate supervisor.
Some things were not ~idiotic~ idiomatic.
Rename everything to
Medera
instead ofSlackIngestor
- the name of the repo should match the name of the application.Move namespaced modules into a subdirectory -
Foo.Bar
should be inlib/foo/bar.ex
.Get the API token at run time. It was a module attribute before (
@token
) - module attributes are determined at compile time. I.e., if we had specified token1 during compile and token2 during a run, token1 would have been used. Also raise an error if the token is not specified, since otherwise the code would fail in less obvious ways.Start
Medera.Consumer
directly under the supervision tree. It's better to have long-running processes running under the supervision tree than to link them to another child process. If you want those two processes to be linked separately from other processes, then give them their own separate supervisor.