Skip to content

Commit

Permalink
config fix
Browse files Browse the repository at this point in the history
  • Loading branch information
[email protected] committed Nov 23, 2020
1 parent d95928f commit c8ce7c7
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 121 deletions.
15 changes: 0 additions & 15 deletions apps/omg/lib/omg/state/transaction/fee.ex
Original file line number Diff line number Diff line change
Expand Up @@ -62,21 +62,6 @@ defmodule OMG.State.Transaction.Fee do
}
end

@doc """
Generates fee-txs to claim collected fees from the forming block
"""
@spec claim_collected(
blknum :: non_neg_integer(),
owner :: Crypto.address_t(),
fees_paid :: %{Crypto.address_t() => pos_integer()}
) :: list(t())
def claim_collected(blknum, owner, fees_paid) do
fees_paid
|> Enum.reject(fn {_token, amount} -> amount == 0 end)
|> Enum.map(fn {token, amount} -> new(blknum, {owner, token, amount}) end)
|> Enum.sort_by(fn %__MODULE__{outputs: [output]} -> output.currency end)
end

@doc """
Transforms the structure of RLP items after a successful RLP decode of a raw transaction, into a structure instance
"""
Expand Down
4 changes: 2 additions & 2 deletions apps/omg_status/lib/omg_status/monitor/statsd_monitor.ex
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ defmodule OMG.Status.Monitor.StatsdMonitor do
use GenServer

require Logger
@default_interval Application.get_env(:omg_status, :statsd_reconnect_backoff_ms)

@type t :: %__MODULE__{
alarm_module: module(),
child_module: module(),
Expand All @@ -31,7 +31,7 @@ defmodule OMG.Status.Monitor.StatsdMonitor do

defstruct alarm_module: nil,
child_module: nil,
interval: @default_interval,
interval: Application.get_env(:omg_status, :statsd_reconnect_backoff_ms),
pid: nil,
raised: false,
tref: nil
Expand Down
53 changes: 0 additions & 53 deletions apps/omg_watcher_info/lib/omg_watcher_info/release_tasks/set_db.ex

This file was deleted.

This file was deleted.

8 changes: 8 additions & 0 deletions config/releases.exs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,15 @@ import Config
#
# See https://hexdocs.pm/mix/1.9.0/Mix.Tasks.Release.html#module-runtime-configuration

mandatory = fn env, exception ->
case System.get_env(env) do
nil -> throw(exception)
data -> data
end
end

config :omg_watcher_info, OMG.WatcherInfo.DB.Repo,
url: mandatory.("DATABASE_URL", "DATABASE_URL needs to be set."),
# Have at most `:pool_size` DB connections on standby and serving DB queries.
pool_size: String.to_integer(System.get_env("WATCHER_INFO_DB_POOL_SIZE") || "10"),
# Wait at most `:queue_target` for a connection. If all connections checked out during
Expand Down
1 change: 0 additions & 1 deletion mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ defmodule OMG.Umbrella.MixProject do
{OMG.Watcher.ReleaseTasks.SetExitProcessorSLAMargin, []},
{OMG.Watcher.ReleaseTasks.SetTracer, []},
{OMG.Watcher.ReleaseTasks.SetApplication, [release: :watcher_info, current_version: current_version()]},
{OMG.WatcherInfo.ReleaseTasks.SetDB, []},
{OMG.WatcherInfo.ReleaseTasks.SetTracer, []}
]
]
Expand Down

0 comments on commit c8ce7c7

Please sign in to comment.