You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After switching to a new version of the node_package I get warnings when interacting with my generated release:
_build/default/rel/vernemq/bin/vernemq ping
/home/lhc/dev/erl.io/vernemq/_build/default/rel/vernemq/bin/../erts-8.2.1/bin/nodetool:192: Warning: random:seed/1: the 'random' module is deprecated; use the 'rand' module instead
/home/lhc/dev/erl.io/vernemq/_build/default/rel/vernemq/bin/../erts-8.2.1/bin/nodetool:195: Warning: random:uniform/1: the 'random' module is deprecated; use the 'rand' module instead
/home/lhc/dev/erl.io/vernemq/_build/default/rel/vernemq/bin/../erts-8.2.1/bin/nodetool:197: Warning: random:uniform/1: the 'random' module is deprecated; use the 'rand' module instead
pong
It seems to be due to the usage of random introduced recently:
the only simple solution I can think of would be to replace the random:uniform(1000) with erlang:phash2(os:getpid(), 1000)? Then there's also no need for the random:seed(os:timestamp) line.
I'd be happy to create a PR for this.
The text was updated successfully, but these errors were encountered:
Basho-JIRA
changed the title
Usage of random module is deprecated in otp19
Usage of random module is deprecated in otp19 [JIRA: TOOLS-474]
Feb 15, 2017
Hi
After switching to a new version of the node_package I get warnings when interacting with my generated release:
It seems to be due to the usage of
random
introduced recently:413a4ab
the only simple solution I can think of would be to replace the
random:uniform(1000)
witherlang:phash2(os:getpid(), 1000)
? Then there's also no need for therandom:seed(os:timestamp)
line.I'd be happy to create a PR for this.
The text was updated successfully, but these errors were encountered: