Skip to content

Commit

Permalink
Use UUID package for uuids instead of SecureRandom.
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxPower15 committed Jan 10, 2016
1 parent 87f046a commit b1bb7a8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/nsq/message_supervisor.ex
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ defmodule NSQ.MessageSupervisor do

def start_child(msg_sup_pid, message, opts \\ []) do
# If a message fails, NSQ will handle requeueing.
id = message.id <> "-" <> SecureRandom.uuid
id = message.id <> "-" <> UUID.uuid4(:hex)
opts = [restart: :temporary, id: id] ++ opts
child = worker(NSQ.Message, [message], opts)
Supervisor.start_child(msg_sup_pid, child)
Expand Down
1 change: 1 addition & 0 deletions mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ defmodule ElixirNsq.Mixfile do
{:poison, "~> 1.5.0"},
{:ibrowse, github: "cmullaparthi/ibrowse", tag: "v4.1.2"},
{:httpotion, "~> 2.1.0"},
{:uuid, "~> 1.1.2"},

# testing
{:secure_random, "~> 0.2", only: :test},
Expand Down
3 changes: 2 additions & 1 deletion mix.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
"httpotion": {:hex, :httpotion, "2.1.0"},
"ibrowse": {:git, "https://github.com/cmullaparthi/ibrowse.git", "ea3305d21f37eced4fac290f64b068e56df7de80", [tag: "v4.1.2"]},
"poison": {:hex, :poison, "1.5.0"},
"secure_random": {:hex, :secure_random, "0.2.0"}}
"secure_random": {:hex, :secure_random, "0.2.0"},
"uuid": {:hex, :uuid, "1.1.2"}}

0 comments on commit b1bb7a8

Please sign in to comment.