Spaces:
Sleeping
Sleeping
Scott Hiett
commited on
Commit
·
d290264
1
Parent(s):
0b53aa4
Cleaning up old logs
Browse files
lib/srh/auth/token_resolver.ex
CHANGED
@@ -37,8 +37,6 @@ defmodule Srh.Auth.TokenResolver do
|
|
37 |
end
|
38 |
|
39 |
def resolve(token) do
|
40 |
-
IO.puts("Resolving token: #{token}")
|
41 |
-
|
42 |
do_resolve(@mode, token)
|
43 |
end
|
44 |
|
|
|
37 |
end
|
38 |
|
39 |
def resolve(token) do
|
|
|
|
|
40 |
do_resolve(@mode, token)
|
41 |
end
|
42 |
|
lib/srh/http/base_router.ex
CHANGED
@@ -50,7 +50,6 @@ defmodule Srh.Http.BaseRouter do
|
|
50 |
{:not_authorized, message} -> %{code: 401, message: message, json: false}
|
51 |
{:server_error, _} -> %{code: 500, message: "An error occurred internally", json: false}
|
52 |
other ->
|
53 |
-
IO.inspect(other)
|
54 |
%{code: 500, message: "An error occurred internally", json: false}
|
55 |
end
|
56 |
|
|
|
50 |
{:not_authorized, message} -> %{code: 401, message: message, json: false}
|
51 |
{:server_error, _} -> %{code: 500, message: "An error occurred internally", json: false}
|
52 |
other ->
|
|
|
53 |
%{code: 500, message: "An error occurred internally", json: false}
|
54 |
end
|
55 |
|
lib/srh/http/command_handler.ex
CHANGED
@@ -7,7 +7,6 @@ defmodule Srh.Http.CommandHandler do
|
|
7 |
def handle_command(conn, token) do
|
8 |
case RequestValidator.validate_redis_body(conn.body_params) do
|
9 |
{:ok, command_array} ->
|
10 |
-
IO.inspect(command_array)
|
11 |
do_handle_command(command_array, token)
|
12 |
{:error, error_message} ->
|
13 |
{:malformed_data, error_message}
|
@@ -17,7 +16,6 @@ defmodule Srh.Http.CommandHandler do
|
|
17 |
def handle_command_array(conn, token) do
|
18 |
case RequestValidator.validate_pipeline_redis_body(conn.body_params) do
|
19 |
{:ok, array_of_command_arrays} ->
|
20 |
-
IO.inspect(array_of_command_arrays)
|
21 |
do_handle_command_array(array_of_command_arrays, token)
|
22 |
{:error, error_message} ->
|
23 |
{:malformed_data, error_message}
|
|
|
7 |
def handle_command(conn, token) do
|
8 |
case RequestValidator.validate_redis_body(conn.body_params) do
|
9 |
{:ok, command_array} ->
|
|
|
10 |
do_handle_command(command_array, token)
|
11 |
{:error, error_message} ->
|
12 |
{:malformed_data, error_message}
|
|
|
16 |
def handle_command_array(conn, token) do
|
17 |
case RequestValidator.validate_pipeline_redis_body(conn.body_params) do
|
18 |
{:ok, array_of_command_arrays} ->
|
|
|
19 |
do_handle_command_array(array_of_command_arrays, token)
|
20 |
{:error, error_message} ->
|
21 |
{:malformed_data, error_message}
|
lib/srh/redis/client.ex
CHANGED
@@ -10,8 +10,6 @@ defmodule Srh.Redis.Client do
|
|
10 |
end
|
11 |
|
12 |
def init({max_connections, connection_info}) do
|
13 |
-
IO.puts("Client starting alive! Srh_id=#{Map.get(connection_info, "srh_id", "not found")}")
|
14 |
-
|
15 |
Process.send(self(), :create_registry, [])
|
16 |
|
17 |
{
|
@@ -45,7 +43,6 @@ defmodule Srh.Redis.Client do
|
|
45 |
end
|
46 |
|
47 |
def handle_info(:idle_death, state) do
|
48 |
-
IO.puts("Client dying! No requests for period. Srh_id=#{Map.get(state.connection_info, "srh_id", "not found")}")
|
49 |
ClientRegistry.destroy_workers(state.registry_pid)
|
50 |
|
51 |
{:stop, :normal, state}
|
|
|
10 |
end
|
11 |
|
12 |
def init({max_connections, connection_info}) do
|
|
|
|
|
13 |
Process.send(self(), :create_registry, [])
|
14 |
|
15 |
{
|
|
|
43 |
end
|
44 |
|
45 |
def handle_info(:idle_death, state) do
|
|
|
46 |
ClientRegistry.destroy_workers(state.registry_pid)
|
47 |
|
48 |
{:stop, :normal, state}
|
lib/srh/redis/client_registry.ex
CHANGED
@@ -40,8 +40,6 @@ defmodule Srh.Redis.ClientRegistry do
|
|
40 |
false -> target
|
41 |
end
|
42 |
|
43 |
-
IO.puts("Worker target: #{corrected_target}, pool size: #{len}")
|
44 |
-
|
45 |
{:reply, {:ok, Enum.at(state.worker_pids, corrected_target)}, %{state | last_worker_index: corrected_target}}
|
46 |
end
|
47 |
end
|
|
|
40 |
false -> target
|
41 |
end
|
42 |
|
|
|
|
|
43 |
{:reply, {:ok, Enum.at(state.worker_pids, corrected_target)}, %{state | last_worker_index: corrected_target}}
|
44 |
end
|
45 |
end
|
lib/srh/redis/client_worker.ex
CHANGED
@@ -6,8 +6,6 @@ defmodule Srh.Redis.ClientWorker do
|
|
6 |
end
|
7 |
|
8 |
def init(connection_info) do
|
9 |
-
IO.puts("Client worker reporting for duty! Srh_id=#{Map.get(connection_info, "srh_id", "not found")}")
|
10 |
-
|
11 |
Process.send(self(), :create_connection, [])
|
12 |
|
13 |
{
|
@@ -35,7 +33,6 @@ defmodule Srh.Redis.ClientWorker do
|
|
35 |
end
|
36 |
|
37 |
def handle_call(msg, _from, state) do
|
38 |
-
IO.inspect(msg)
|
39 |
{:reply, :ok, state}
|
40 |
end
|
41 |
|
@@ -54,7 +51,6 @@ defmodule Srh.Redis.ClientWorker do
|
|
54 |
)
|
55 |
when is_binary(connection_string) do
|
56 |
{:ok, pid} = Redix.start_link(connection_string)
|
57 |
-
IO.puts("Redis up and running for worker Srh_id=#{Map.get(state.connection_info, "srh_id", "not found")}")
|
58 |
{:noreply, %{state | redix_pid: pid}}
|
59 |
end
|
60 |
|
|
|
6 |
end
|
7 |
|
8 |
def init(connection_info) do
|
|
|
|
|
9 |
Process.send(self(), :create_connection, [])
|
10 |
|
11 |
{
|
|
|
33 |
end
|
34 |
|
35 |
def handle_call(msg, _from, state) do
|
|
|
36 |
{:reply, :ok, state}
|
37 |
end
|
38 |
|
|
|
51 |
)
|
52 |
when is_binary(connection_string) do
|
53 |
{:ok, pid} = Redix.start_link(connection_string)
|
|
|
54 |
{:noreply, %{state | redix_pid: pid}}
|
55 |
end
|
56 |
|