Skip to content

Commit

Permalink
make the HTTP producer configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
paulswartz committed Mar 13, 2019
1 parent bfb254e commit d6b336e
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion config/config.exs
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ config :concentrate,
],
file_tap: [
enabled?: false
]
],
http_producer: Concentrate.Producer.HTTPoison

import_config "#{Mix.env()}.exs"
2 changes: 1 addition & 1 deletion lib/concentrate/filter/alert/supervisor.ex
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ defmodule Concentrate.Filter.Alert.Supervisor do
Supervisor.start_link(
[
{
Concentrate.Producer.HTTPoison,
Application.get_env(:concentrate, :http_producer),
{
config[:url],
parser: Concentrate.Parser.Alerts,
Expand Down
2 changes: 1 addition & 1 deletion lib/concentrate/filter/gtfs/supervisor.ex
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ defmodule Concentrate.Filter.GTFS.Supervisor do
Supervisor.start_link(
[
{
Concentrate.Producer.HTTPoison,
Application.get_env(:concentrate, :http_producer),
{
config[:url],
parser: Concentrate.Filter.GTFS.Unzip,
Expand Down
2 changes: 1 addition & 1 deletion lib/concentrate/supervisor/pipeline.ex
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ defmodule Concentrate.Supervisor.Pipeline do

child_spec(
{
Concentrate.Producer.HTTPoison,
Application.get_env(:concentrate, :http_producer),
{url, [name: source, parser: parser] ++ opts}
},
id: source
Expand Down

0 comments on commit d6b336e

Please sign in to comment.