async-limiter 1.3.0 → 1.3.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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5b8fe52d0adb39187c467e5a9195df3fc974cdad0c66e20ca4fbb8f2331e108a
|
4
|
+
data.tar.gz: 65aee35742f72694b2a1c1e4d34b41ee0d6e03eedc0f82029dbac31d042a1ad1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 575d83be39d544535c060e113934f147e94a81f97423b3207036610edc7b8e5a230dd46301e7e20253cbd477cf1ef2ba8ead19dc610a465665c10238c5357090
|
7
|
+
data.tar.gz: 033f5f5b7063c908fb250198789e053c02b512e9c04e1d56fe8ac01486c93030df7dc7046cf4923cdb2f3282c8f1ad066f97ed8319f6061ba9f1a5a275b9abda
|
@@ -4,14 +4,15 @@ module Async
|
|
4
4
|
module Limiter
|
5
5
|
class Window
|
6
6
|
class Continuous < Window
|
7
|
-
def initialize(limit = 1, window: 1, parent: nil, lock: true)
|
7
|
+
def initialize(limit = 1, window: 1, parent: nil, lock: true, queue: [])
|
8
8
|
super(
|
9
9
|
limit,
|
10
10
|
type: :sliding, # type doesn't matter, but sliding is less work
|
11
11
|
burstable: false,
|
12
12
|
window: window,
|
13
13
|
parent: parent,
|
14
|
-
lock: lock
|
14
|
+
lock: lock,
|
15
|
+
queue: queue
|
15
16
|
)
|
16
17
|
end
|
17
18
|
end
|
@@ -4,14 +4,15 @@ module Async
|
|
4
4
|
module Limiter
|
5
5
|
class Window
|
6
6
|
class Fixed < Window
|
7
|
-
def initialize(limit = 1, window: 1, parent: nil, lock: true)
|
7
|
+
def initialize(limit = 1, window: 1, parent: nil, lock: true, queue: [])
|
8
8
|
super(
|
9
9
|
limit,
|
10
10
|
type: :fixed,
|
11
11
|
burstable: true,
|
12
12
|
window: window,
|
13
13
|
parent: parent,
|
14
|
-
lock: lock
|
14
|
+
lock: lock,
|
15
|
+
queue: queue
|
15
16
|
)
|
16
17
|
end
|
17
18
|
end
|
@@ -4,14 +4,15 @@ module Async
|
|
4
4
|
module Limiter
|
5
5
|
class Window
|
6
6
|
class Sliding < Window
|
7
|
-
def initialize(limit = 1, window: 1, parent: nil, lock: true)
|
7
|
+
def initialize(limit = 1, window: 1, parent: nil, lock: true, queue: [])
|
8
8
|
super(
|
9
9
|
limit,
|
10
10
|
type: :sliding,
|
11
11
|
burstable: true,
|
12
12
|
window: window,
|
13
13
|
parent: parent,
|
14
|
-
lock: lock
|
14
|
+
lock: lock,
|
15
|
+
queue: queue
|
15
16
|
)
|
16
17
|
end
|
17
18
|
end
|