-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #17 from stueccles/batch-implementation
New implementation with batching and retry
- Loading branch information
Showing
35 changed files
with
965 additions
and
2,993 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,14 @@ | ||
# This file is responsible for configuring your application | ||
# and its dependencies with the aid of the Mix.Config module. | ||
use Mix.Config | ||
import Config | ||
|
||
# This configuration is loaded before any dependency and is restricted | ||
# to this project. If another project depends on this project, this | ||
# file won't be loaded nor affect the parent project. For this reason, | ||
# if you want to provide default values for your application for third- | ||
# party users, it should be done in your mix.exs file. | ||
config :segment, | ||
sender_impl: Segment.Analytics.Batcher, | ||
max_batch_size: 100, | ||
batch_every_ms: 5000 | ||
|
||
# Sample configuration: | ||
# | ||
# config :logger, :console, | ||
# level: :info, | ||
# format: "$date $time [$level] $metadata$message\n", | ||
# metadata: [:user_id] | ||
config :segment, | ||
retry_attempts: 3, | ||
retry_expiry: 10_000, | ||
retry_start: 100 | ||
|
||
# It is also possible to import configuration files, relative to this | ||
# directory. For example, you can emulate configuration per environment | ||
# by uncommenting the line below and defining dev.exs, test.exs and such. | ||
# Configuration from the imported file will override the ones defined | ||
# here (which is why it is important to import them last). | ||
# | ||
# import_config "#{Mix.env}.exs" | ||
env_config = "#{Mix.env()}.exs" | ||
File.exists?("config/#{env_config}") && import_config(env_config) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import Config | ||
|
||
config :segment, :send_to_http, true |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.