blackstack_commons 1.1.18 → 1.1.19
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/functions.rb +5 -5
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d51fd13ba00ed9f54bda8d4a372257f8cbc9f58b
|
4
|
+
data.tar.gz: d9af32eb424f6f1865bb56ed74792ec95848efaa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b5288b1620883ee73240aea2636a61f47426a07c8dd026d64f9bcd35ee71b6d70d1c9a3cae457d340d61963a93c5776d4b85bcb540ccf5043eb05580454ae6f7
|
7
|
+
data.tar.gz: 2ec2a5da7afe4eb951b40b3b0593a5c2c5b67cdf84a64649f47e839fb56bb04da31d3ba62a2d9b43551302c28dfa97b05bcf5edd1b3e2738fb8f54f81bdfdc04
|
data/lib/functions.rb
CHANGED
@@ -509,14 +509,14 @@ module BlackStack
|
|
509
509
|
def self.call_post(url, params = {}, ssl_verify_mode=BlackStack::Netting::DEFAULT_SSL_VERIFY_MODE, use_lockfile=true)
|
510
510
|
# build the lockfile name
|
511
511
|
x = 0
|
512
|
-
|
512
|
+
|
513
513
|
if BlackStack::Netting.max_api_call_channels.to_i > 0
|
514
514
|
raise "Max Channels cannot be higher than #{BlackStack::Netting.lockfiles.size.to_s}" if BlackStack::Netting.max_api_call_channels > BlackStack::Netting.lockfiles.size
|
515
515
|
x = rand(BlackStack::Netting.max_api_call_channels)
|
516
516
|
# lock the file
|
517
517
|
BlackStack::Netting.lockfiles[x].flock(File::LOCK_EX) if use_lockfile
|
518
518
|
end
|
519
|
-
|
519
|
+
|
520
520
|
begin
|
521
521
|
|
522
522
|
# do the call
|
@@ -536,16 +536,16 @@ module BlackStack
|
|
536
536
|
end
|
537
537
|
|
538
538
|
# release the file
|
539
|
-
|
539
|
+
BlackStack::Netting.lockfiles[x].flock(File::LOCK_UN) if use_lockfile && BlackStack::Netting.max_api_call_channels.to_i > 0
|
540
540
|
rescue => e
|
541
541
|
# release the file
|
542
|
-
|
542
|
+
BlackStack::Netting.lockfiles[x].flock(File::LOCK_UN) if use_lockfile && BlackStack::Netting.max_api_call_channels.to_i > 0
|
543
543
|
|
544
544
|
# elevo la excepcion
|
545
545
|
raise e
|
546
546
|
ensure
|
547
547
|
# release the file
|
548
|
-
|
548
|
+
BlackStack::Netting.lockfiles[x].flock(File::LOCK_UN) if use_lockfile && BlackStack::Netting.max_api_call_channels.to_i > 0
|
549
549
|
end
|
550
550
|
|
551
551
|
# return
|