magellan-gcs-proxy 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/example/Gemfile.lock +5 -5
- data/lib/magellan/gcs/proxy/cli.rb +1 -0
- data/lib/magellan/gcs/proxy/pubsub_sustainer.rb +22 -6
- data/lib/magellan/gcs/proxy/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f274888037621b3123477b9770fe6a47aad3261f
|
4
|
+
data.tar.gz: a63901a3c16ee906bdfaabbef597abedfc959c36
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5e9f4f0c29a3aa5537e717693daf8c5ec65ae9a228454a79c14e98cbbd0d0e6371388ecfa325b18215ec3f652fb46d4b597fa8fb8e37baf5b8aeb598409d3f4f
|
7
|
+
data.tar.gz: c640f5d0e52f2a8c27b96a8e4a72f707ee37561df9a956a75087098fc926d6704e7fc960de24a7cc0ce7335d97a966c8db6e52e00b4f8a461426db4cf6670e98
|
data/example/Gemfile.lock
CHANGED
@@ -26,7 +26,7 @@ GEM
|
|
26
26
|
retriable (~> 2.0)
|
27
27
|
google-cloud-core (0.21.1)
|
28
28
|
googleauth (~> 0.5.1)
|
29
|
-
google-cloud-logging (0.
|
29
|
+
google-cloud-logging (0.23.0)
|
30
30
|
google-cloud-core (~> 0.21.0)
|
31
31
|
google-gax (~> 0.6.0)
|
32
32
|
google-protobuf (~> 3.0)
|
@@ -40,7 +40,7 @@ GEM
|
|
40
40
|
googleapis-common-protos (~> 1.3)
|
41
41
|
grpc (~> 1.0)
|
42
42
|
grpc-google-iam-v1 (~> 0.6.8)
|
43
|
-
google-cloud-storage (0.
|
43
|
+
google-cloud-storage (0.23.1)
|
44
44
|
digest-crc (~> 0.4)
|
45
45
|
google-api-client (~> 0.9.11)
|
46
46
|
google-cloud-core (~> 0.21.0)
|
@@ -68,7 +68,7 @@ GEM
|
|
68
68
|
googleapis-common-protos (~> 1.3.1)
|
69
69
|
googleauth (~> 0.5.1)
|
70
70
|
grpc (~> 1.0)
|
71
|
-
httpclient (2.8.
|
71
|
+
httpclient (2.8.3)
|
72
72
|
hurley (0.2)
|
73
73
|
jwt (1.5.6)
|
74
74
|
little-plugger (1.1.4)
|
@@ -76,7 +76,7 @@ GEM
|
|
76
76
|
logging (2.1.0)
|
77
77
|
little-plugger (~> 1.1)
|
78
78
|
multi_json (~> 1.10)
|
79
|
-
magellan-gcs-proxy (0.1.
|
79
|
+
magellan-gcs-proxy (0.1.3)
|
80
80
|
dotenv
|
81
81
|
google-cloud-logging
|
82
82
|
google-cloud-pubsub
|
@@ -95,7 +95,7 @@ GEM
|
|
95
95
|
coderay (~> 1.1.0)
|
96
96
|
method_source (~> 0.8.1)
|
97
97
|
slop (~> 3.4)
|
98
|
-
pry-byebug (3.4.
|
98
|
+
pry-byebug (3.4.2)
|
99
99
|
byebug (~> 9.0)
|
100
100
|
pry (~> 0.10)
|
101
101
|
pry-stack_explorer (0.4.9.2)
|
@@ -38,15 +38,31 @@ module Magellan
|
|
38
38
|
|
39
39
|
def run
|
40
40
|
loop do
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
message.delay! delay
|
45
|
-
rescue => e
|
46
|
-
logger.error(e)
|
41
|
+
debug("is sleeping #{interval} sec.")
|
42
|
+
unless wait_while_processing(interval)
|
43
|
+
debug('is stopping.')
|
47
44
|
break
|
48
45
|
end
|
46
|
+
debug("is sending delay!(#{delay})")
|
47
|
+
message.delay! delay
|
48
|
+
debug("sent delay!(#{delay}) successfully")
|
49
49
|
end
|
50
|
+
debug('stopped.')
|
51
|
+
rescue => e
|
52
|
+
logger.error(e)
|
53
|
+
end
|
54
|
+
|
55
|
+
def debug(msg)
|
56
|
+
logger.debug("#{self.class.name} #{msg}")
|
57
|
+
end
|
58
|
+
|
59
|
+
def wait_while_processing(seconds)
|
60
|
+
limit = Time.now.to_f + seconds
|
61
|
+
while Time.now.to_f < limit
|
62
|
+
return false unless Thread.current[:processing_message]
|
63
|
+
sleep(0.1)
|
64
|
+
end
|
65
|
+
true
|
50
66
|
end
|
51
67
|
end
|
52
68
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: magellan-gcs-proxy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- akm
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-12-
|
11
|
+
date: 2016-12-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dotenv
|