dronejob 2.0.0 → 2.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +11 -11
- data/lib/dronejob/modules/log.rb +4 -6
- data/lib/dronejob/version.rb +1 -1
- 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: b555f9cdada7c8119f84414446fbf616e38e8ffe
|
4
|
+
data.tar.gz: a3fdb6dc20761e396025ccb884b4f0164c425758
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 56345d732edfb887ab2eb8429898cec48bb28d9cd9a6da3da4b9ff17b7ef8c20549867d3b88dedee7a5756510f13b8d8b989d292425177d6953f39917d47be81
|
7
|
+
data.tar.gz: ce4181b1692c3f9c754b874e0c235ed6655eb5d1a0f63307ae781483cd0d86b465e2a68ce0974d96337b60795ab6aae0e5cec4fa8ea8cd94a92158ed21248201
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
dronejob (2.0.
|
4
|
+
dronejob (2.0.1)
|
5
5
|
actionpack (>= 4.0.2)
|
6
6
|
activejob (>= 4.0.2)
|
7
7
|
activejob-google_cloud_pubsub (>= 0.7)
|
@@ -72,10 +72,10 @@ GEM
|
|
72
72
|
google-gax (~> 1.3)
|
73
73
|
googleapis-common-protos-types (>= 1.0.2)
|
74
74
|
stackdriver-core (~> 1.3)
|
75
|
-
google-cloud-pubsub (0.
|
75
|
+
google-cloud-pubsub (0.35.0)
|
76
76
|
concurrent-ruby (~> 1.0)
|
77
77
|
google-cloud-core (~> 1.2)
|
78
|
-
google-gax (~> 1.
|
78
|
+
google-gax (~> 1.3)
|
79
79
|
grpc-google-iam-v1 (~> 0.6.9)
|
80
80
|
google-gax (1.5.0)
|
81
81
|
google-protobuf (~> 3.2)
|
@@ -151,7 +151,7 @@ GEM
|
|
151
151
|
loofah (~> 2.2, >= 2.2.2)
|
152
152
|
rainbow (3.0.0)
|
153
153
|
rly (0.2.3)
|
154
|
-
rmagick (
|
154
|
+
rmagick (3.1.0)
|
155
155
|
rspec (3.8.0)
|
156
156
|
rspec-core (~> 3.8.0)
|
157
157
|
rspec-expectations (~> 3.8.0)
|
@@ -190,20 +190,20 @@ GEM
|
|
190
190
|
tzinfo (1.2.5)
|
191
191
|
thread_safe (~> 0.1)
|
192
192
|
unicode-display_width (1.6.0)
|
193
|
-
workspace (1.0.
|
193
|
+
workspace (1.0.16)
|
194
194
|
bundler (>= 1.12.0, < 3.0.0)
|
195
|
-
mime-types (~> 3.
|
196
|
-
workspace-archive (1.0.
|
195
|
+
mime-types (~> 3.2)
|
196
|
+
workspace-archive (1.0.16)
|
197
197
|
rubyzip (~> 1.2)
|
198
198
|
workspace (~> 1.0)
|
199
|
-
workspace-media (1.0.
|
199
|
+
workspace-media (1.0.16)
|
200
200
|
piet (~> 0.2)
|
201
|
-
rmagick (~>
|
201
|
+
rmagick (~> 3.1)
|
202
202
|
workspace (~> 1.0)
|
203
|
-
workspace-net (1.0.
|
203
|
+
workspace-net (1.0.16)
|
204
204
|
typhoeus (~> 1.3)
|
205
205
|
workspace (~> 1.0)
|
206
|
-
workspace-parse (1.0.
|
206
|
+
workspace-parse (1.0.16)
|
207
207
|
haml (~> 5.0)
|
208
208
|
workspace (~> 1.0)
|
209
209
|
|
data/lib/dronejob/modules/log.rb
CHANGED
@@ -21,7 +21,7 @@ module Dronejob
|
|
21
21
|
elsif dronejob_log == "google"
|
22
22
|
logging = Google::Cloud::Logging.new(project: option(:google_cloud_project_id))
|
23
23
|
resource = logging.resource("gce_instance", { zone: option(:google_cloud_zone), instance_id: option(:google_cloud_instance_id) })
|
24
|
-
custom_logger = logging.logger(
|
24
|
+
custom_logger = logging.logger(option(:dronejob_queue), resource)
|
25
25
|
else
|
26
26
|
custom_logger = ActiveSupport::Logger.new(dronejob_log)
|
27
27
|
end
|
@@ -33,11 +33,9 @@ module Dronejob
|
|
33
33
|
def log(level, message, job = nil)
|
34
34
|
if !logger.nil?
|
35
35
|
if option(:dronejob_log) == "google"
|
36
|
-
message = "[#{job
|
37
|
-
data = { message: message, job_id: job
|
38
|
-
|
39
|
-
# data[:user_id] = job.param(:user_id) if job.param(:user_id)
|
40
|
-
data[:phase_title] = job.phase_config[:title].to_s if job.phase_config&.key?(:title)
|
36
|
+
message = "[#{job&.job_id}] #{message}" if level != :error
|
37
|
+
data = { message: message, job_id: job&.job_id, queue: job&.queue_name, phase: "none" }
|
38
|
+
data[:phase_title] = job.phase_config[:title].to_s if job&.phase_config&.key?(:title)
|
41
39
|
if job&.phase_config&.key?(:progress)
|
42
40
|
data[:phase_progress] = job.phase_config[:progress]
|
43
41
|
end
|
data/lib/dronejob/version.rb
CHANGED