stack-service-base 0.0.21 → 0.0.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/stack-service-base/fiber_pool.rb +5 -3
- data/lib/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 99bb096f5c4352aec44aacf9f7453e5341f4236608f34329da857349598450aa
|
4
|
+
data.tar.gz: 6433bfec1423c73e78370389d0cb9975de7973d5bb5931886994d468f6a16dca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bd978f660cae501b938c4809cb9d91691d0725ef1c499dd5ffba82543086e045879d3640a6d9a6ba0b84c6edff0d338f0a2029e6ef31d8384fcb27a56a259972
|
7
|
+
data.tar.gz: d7c577058adb0f958add55962be39f0b1356e7f784f92e32c3e45599c45289ec493fcecd2f90108367c13cb560fbd0a1700d37d5c5a9877b272d74a67813f06b
|
@@ -26,7 +26,7 @@ class FiberConnectionPool < Sequel::ConnectionPool
|
|
26
26
|
super
|
27
27
|
@allocator = ->() {
|
28
28
|
make_new(:default).tap { |conn|
|
29
|
-
$local_log["new connection (fiber pool) #{conn}"]
|
29
|
+
$local_log["new connection (fiber pool) #{conn.__id__}"]
|
30
30
|
}
|
31
31
|
}
|
32
32
|
@stock = []
|
@@ -102,8 +102,10 @@ require 'sequel/adapters/postgres'
|
|
102
102
|
class Sequel::Postgres::Adapter
|
103
103
|
def execute_query(sql, args)
|
104
104
|
$stdout.puts "F:#{Fiber.current.__id__} : T:#{Thread.current.__id__} : A:#{self.__id__} : #{sql[0..60]}" unless defined? PERFORMANCE
|
105
|
-
$local_log["query: #{sql.slice(0, 60)}"]
|
106
|
-
@db.log_connection_yield(sql, self, args)
|
105
|
+
$local_log["query (#{self.__id__}): #{sql.slice(0, 60)}"]
|
106
|
+
@db.log_connection_yield(sql, self, args) do
|
107
|
+
args ? async_exec_params(sql, args) : async_exec(sql)
|
108
|
+
end
|
107
109
|
rescue => e
|
108
110
|
$local_log["Error: #{e.message}"]
|
109
111
|
$stdout.puts e.message
|
data/lib/version.rb
CHANGED