Skip to content

Commit

Permalink
refactored mnesia handling
Browse files Browse the repository at this point in the history
  • Loading branch information
FelidaeHome committed May 4, 2015
1 parent fc81500 commit b481a7f
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
10 changes: 9 additions & 1 deletion apps/horst/src/core/horst_app.erl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,15 @@


start(_StartType, _StartArgs) ->
start_database(),
horst_sup:start_link().

stop(_State) ->
ok.
ok.

start_database() ->
lager:info("create the schema for the database"),
application:stop(mnesia),
mnesia:create_schema([node()]),
lager:info("start the database"),
application:start(mnesia).
5 changes: 4 additions & 1 deletion rel/files/vm.args
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
## Name of the node
-name erlything@127.0.0.1
-sname erlything

## Cookie for distributed erlang
-setcookie {{cookie}}

## mnesia dir
-mnesia dir data

## Heartbeat management; auto-restarts VM if it dies or becomes unresponsive
## (Disabled by default..use with caution!)
##-heart
Expand Down
1 change: 1 addition & 0 deletions rel/reltool.config
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
{overlay, [
{mkdir, "etc"},
{mkdir, "log/sasl"},
{mkdir, "data"},
{template, "../etc/app.config.template", "etc/app.config"},
{copy, "files/erl", "\{\{erts_vsn\}\}/bin/erl"},
{copy, "files/nodetool", "\{\{erts_vsn\}\}/bin/nodetool"},
Expand Down

0 comments on commit b481a7f

Please sign in to comment.