Skip to content

Commit

Permalink
new implementation with batching and retry
Browse files Browse the repository at this point in the history
  • Loading branch information
Stuart Eccles committed Aug 2, 2019
1 parent 32517c2 commit d108d2e
Show file tree
Hide file tree
Showing 34 changed files with 417 additions and 2,948 deletions.
30 changes: 9 additions & 21 deletions config/config.exs
Original file line number Diff line number Diff line change
@@ -1,24 +1,12 @@
# 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, :service, Segment.Analytics.Batcher
config :segment, :max_batch_size, 100
config :segment, :batch_every_ms, 5_000

# Sample configuration:
#
# config :logger, :console,
# level: :info,
# format: "$date $time [$level] $metadata$message\n",
# metadata: [:user_id]
config :segment, :retry_attempts, 3
config :segment, :retry_expiry, 10_000
config :segment, :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)
3 changes: 3 additions & 0 deletions config/test.exs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import Config

config :segment, :tesla, adapter: Segment.Tesla.Mock
20 changes: 0 additions & 20 deletions doc/.build

This file was deleted.

89 changes: 0 additions & 89 deletions doc/404.html

This file was deleted.

100 changes: 0 additions & 100 deletions doc/Segment.Analytics.Alias.html

This file was deleted.

Loading

0 comments on commit d108d2e

Please sign in to comment.