async-pool 0.9.0 → 0.10.1
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
- checksums.yaml.gz.sig +0 -0
- data/lib/async/pool/controller.rb +28 -22
- data/lib/async/pool/version.rb +1 -1
- data.tar.gz.sig +0 -0
- metadata +2 -16
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 003c7bc5ebfd789e4350f68af08301a24628b8782d1e9255ea69e6a92c74198a
|
4
|
+
data.tar.gz: 064e1ab27d50b280718157bf8bef400ca0c0850bed547983ae945b78b59c159d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 19ea0dc13e3a20bff67f5f3948187e6dc088acef4fb18a3d57a6c8f7c9d24bd4cf9dbd81128f59c818a9e55b216904e512b99c85667a024d24b7f070831342b8
|
7
|
+
data.tar.gz: e39da4c0bc5c38cb7c5a1887976b08a5b0ec4c28195285e4a47b82d609f126326dbf2b3b5267c62dbe3615fd27c4f0a9afc7e07784840173bcde3ad3e652c20f
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
@@ -12,7 +12,6 @@ require "async/notification"
|
|
12
12
|
require "async/semaphore"
|
13
13
|
|
14
14
|
require "traces"
|
15
|
-
require "metrics"
|
16
15
|
|
17
16
|
module Async
|
18
17
|
module Pool
|
@@ -39,7 +38,7 @@ module Async
|
|
39
38
|
@policy = policy
|
40
39
|
@gardener = nil
|
41
40
|
|
42
|
-
@tags =
|
41
|
+
@tags = tags
|
43
42
|
|
44
43
|
# All available resources:
|
45
44
|
@resources = {}
|
@@ -391,45 +390,52 @@ module Async
|
|
391
390
|
def create_resource(...)
|
392
391
|
attributes = {
|
393
392
|
concurrency: @guard.limit,
|
394
|
-
size: @resources.size,
|
395
|
-
limit: @limit,
|
396
|
-
tags: @tags,
|
397
393
|
}
|
398
394
|
|
399
|
-
|
395
|
+
attributes.merge!(@tags) if @tags
|
396
|
+
|
397
|
+
Traces.trace('async.pool.create', attributes: attributes) {super}
|
400
398
|
end
|
401
399
|
|
402
400
|
def drain(...)
|
403
401
|
attributes = {
|
404
402
|
size: @resources.size,
|
405
|
-
tags: @tags,
|
406
403
|
}
|
407
404
|
|
408
|
-
|
405
|
+
attributes.merge!(@tags) if @tags
|
406
|
+
|
407
|
+
Traces.trace('async.pool.drain', attributes: attributes) {super}
|
409
408
|
end
|
410
|
-
end
|
411
|
-
|
412
|
-
Metrics::Provider(self) do
|
413
|
-
ACQUIRE_COUNT = Metrics.metric("async.pool.acquire", :counter, description: "Number of times a resource was invoked.")
|
414
|
-
RELEASE_COUNT = Metrics.metric("async.pool.release", :counter, description: "Number of times a resource was released.")
|
415
|
-
RETIRE_COUNT = Metrics.metric("async.pool.retire", :counter, description: "Number of times a resource was retired.")
|
416
409
|
|
417
410
|
def acquire(...)
|
418
|
-
|
411
|
+
attributes = {
|
412
|
+
size: @resources.size,
|
413
|
+
limit: @limit,
|
414
|
+
}
|
415
|
+
|
416
|
+
attributes.merge!(@tags) if @tags
|
419
417
|
|
420
|
-
super
|
418
|
+
Traces.trace('async.pool.acquire', attributes: attributes) {super}
|
421
419
|
end
|
422
420
|
|
423
421
|
def release(...)
|
424
|
-
|
425
|
-
|
426
|
-
|
422
|
+
attributes = {
|
423
|
+
size: @resources.size,
|
424
|
+
}
|
425
|
+
|
426
|
+
attributes.merge!(@tags) if @tags
|
427
|
+
|
428
|
+
Traces.trace('async.pool.release', attributes: attributes) {super}
|
427
429
|
end
|
428
430
|
|
429
431
|
def retire(...)
|
430
|
-
|
431
|
-
|
432
|
-
|
432
|
+
attributes = {
|
433
|
+
size: @resources.size,
|
434
|
+
}
|
435
|
+
|
436
|
+
attributes.merge!(@tags) if @tags
|
437
|
+
|
438
|
+
Traces.trace('async.pool.retire', attributes: attributes) {super}
|
433
439
|
end
|
434
440
|
end
|
435
441
|
end
|
data/lib/async/pool/version.rb
CHANGED
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: async-pool
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.10.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Williams
|
@@ -40,7 +40,7 @@ cert_chain:
|
|
40
40
|
Q2K9NVun/S785AP05vKkXZEFYxqG6EW012U4oLcFl5MySFajYXRYbuUpH6AY+HP8
|
41
41
|
voD0MPg1DssDLKwXyt1eKD/+Fq0bFWhwVM/1XiAXL7lyYUyOq24KHgQ2Csg=
|
42
42
|
-----END CERTIFICATE-----
|
43
|
-
date: 2024-10-
|
43
|
+
date: 2024-10-13 00:00:00.000000000 Z
|
44
44
|
dependencies:
|
45
45
|
- !ruby/object:Gem::Dependency
|
46
46
|
name: async
|
@@ -56,20 +56,6 @@ dependencies:
|
|
56
56
|
- - ">="
|
57
57
|
- !ruby/object:Gem::Version
|
58
58
|
version: '1.25'
|
59
|
-
- !ruby/object:Gem::Dependency
|
60
|
-
name: metrics
|
61
|
-
requirement: !ruby/object:Gem::Requirement
|
62
|
-
requirements:
|
63
|
-
- - "~>"
|
64
|
-
- !ruby/object:Gem::Version
|
65
|
-
version: '0.11'
|
66
|
-
type: :runtime
|
67
|
-
prerelease: false
|
68
|
-
version_requirements: !ruby/object:Gem::Requirement
|
69
|
-
requirements:
|
70
|
-
- - "~>"
|
71
|
-
- !ruby/object:Gem::Version
|
72
|
-
version: '0.11'
|
73
59
|
- !ruby/object:Gem::Dependency
|
74
60
|
name: traces
|
75
61
|
requirement: !ruby/object:Gem::Requirement
|
metadata.gz.sig
CHANGED
Binary file
|