Browse Source

fix deps and specs

Yuriy Zhloba 8 years ago
parent
commit
f99e09a3bb
7 changed files with 22 additions and 18 deletions
  1. 0 7
      .gitignore
  2. 1 0
      Makefile
  3. 2 2
      include/epgsql_pool.hrl
  4. 4 6
      rebar.config
  5. 12 0
      rebar.lock
  6. 1 1
      src/epgsql_pool.app.src
  7. 2 2
      src/epgsql_pool_worker.erl

+ 0 - 7
.gitignore

@@ -1,11 +1,4 @@
-.eunit
-*.beam
-ebin
-deps/
-.rebar
-logs
 erl_crash.dump
 _build
-rebar.lock
 .idea
 *.iml

+ 1 - 0
Makefile

@@ -20,3 +20,4 @@ clean:
 
 clean-all:
 	rm -rf _build
+	rm rebar.lock

+ 2 - 2
include/epgsql_pool.hrl

@@ -8,7 +8,7 @@
          }).
 
 -record(epgsql_connection, {
-          sock :: pid(),
-          params :: #epgsql_connection_params{},
+          sock :: pid() | undefined,
+          params :: #epgsql_connection_params{} | undefined,
           reconnect_attempt = 0 :: non_neg_integer()
          }).

+ 4 - 6
rebar.config

@@ -1,11 +1,9 @@
 %%-*- mode: erlang -*-
 
-{erl_opts, [
-            warn_missing_spec
-           ]}.
+{erl_opts, [warn_missing_spec]}.
 
 {deps, [
-        {pooler, {git, "https://github.com/seth/pooler", {tag, "1.5.2"}}},
-        {epgsql, {git, "https://github.com/epgsql/epgsql", {tag, "3.2.0"}}},
-        {herd, {git, "https://github.com/wgnet/herd", {tag, "1.3"}}}
+        {pooler, "1.5.0"},
+        {epgsql, "3.3.0"},
+        {herd, {git, "https://github.com/wgnet/herd", {tag, "1.3.3"}}}
        ]}.

+ 12 - 0
rebar.lock

@@ -0,0 +1,12 @@
+{"1.1.0",
+[{<<"epgsql">>,{pkg,<<"epgsql">>,<<"3.3.0">>},0},
+ {<<"herd">>,
+  {git,"https://github.com/wgnet/herd",
+       {ref,"7ef6954e13e854f32b02a2b97362458ed5208f8d"}},
+  0},
+ {<<"pooler">>,{pkg,<<"pooler">>,<<"1.5.0">>},0}]}.
+[
+{pkg_hash,[
+ {<<"epgsql">>, <<"974A578340E52012CBAB820CE756E7ED1DF1BAF0110C59A6753D8337A2CF9454">>},
+ {<<"pooler">>, <<"0FD4BE5D2976E6A2E9A1617623031758C26F200C1FCA89E4A3C542747BEC6371">>}]}
+].

+ 1 - 1
src/epgsql_pool.app.src

@@ -3,7 +3,7 @@
 {application, epgsql_pool,
  [
   {description, "Connection pool for PostgreSQL"},
-  {vsn, "1.0.0"},
+  {vsn, "1.3.0"},
   {registered, []},
   {applications, [epgsql, pooler]},
   {env, [

+ 2 - 2
src/epgsql_pool_worker.erl

@@ -9,8 +9,8 @@
 -include("otp_types.hrl").
 
 -record(state, {pool_name :: atom(),
-                connection :: #epgsql_connection{},
-                keep_alive_query_ref :: reference(), % ref to async keep-alive query to DB
+                connection :: #epgsql_connection{} | undefined,
+                keep_alive_query_ref :: reference() | undefined, % ref to async keep-alive query to DB
                 send_keep_alive_timer :: reference(), % timer to send keep-alive query to DB
                 no_reply_keep_alive_timer :: reference() % timer to wait for reply from DB
                }).