mobilize-base 1.21 → 1.22

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 55bd98df99800c3660011bfb2ca91cd081d9c9b4
4
+ data.tar.gz: 63429987593c8089c6114c2acbd423c790eb6e57
5
+ SHA512:
6
+ metadata.gz: 8fc93ae0db4ba9248db13e6d65b2897476f1b6270e6de4c80bc997654a53bd666da1985b698ec7f3ecfdd46a99bb31bc951f452db7bab34c2b0f701d79c740ee
7
+ data.tar.gz: 3da48a87c969313fd8c38e176b83e9dbbe7b1505b2c1084fd79d1b5477f8c6d072ba70464780fe54d9c61d42ad64f4f796be3e6f3b525dd7808b2811062a92cf
@@ -137,11 +137,16 @@ module Mobilize
137
137
  source = s.sources.first
138
138
  raise "Need source for gsheet write" unless source
139
139
  tsv = source.read(u.name,gdrive_slot)
140
- raise "No data found in #{source.url}" unless tsv
141
- Dataset.write_by_url(s.target.url,tsv,u.name,gdrive_slot,crop)
140
+ raise "No data source found for #{source.url}" unless tsv
141
+ stdout = if tsv.to_s.length == 0
142
+ #soft error; no data to write. Stage will complete.
143
+ "Write skipped for #{s.target.url}"
144
+ else
145
+ Dataset.write_by_url(s.target.url,tsv,u.name,gdrive_slot,crop)
146
+ #update status
147
+ "Write successful for #{s.target.url}"
148
+ end
142
149
  Gdrive.unslot_worker_by_path(stage_path)
143
- #update status
144
- stdout = "Write successful for #{s.target.url}"
145
150
  stderr = nil
146
151
  s.update_status(stdout)
147
152
  signal = 0
@@ -80,7 +80,11 @@ module Mobilize
80
80
  s.update_attributes(:started_at=>Time.now.utc)
81
81
  s.update_status(%{Starting at #{Time.now.utc}})
82
82
  #get response by running method
83
- response = "Mobilize::#{s.handler.humanize}".constantize.send("#{s.call}_by_stage_path",s.path)
83
+ response = begin
84
+ "Mobilize::#{s.handler.humanize}".constantize.send("#{s.call}_by_stage_path",s.path)
85
+ rescue => exc
86
+ {'err_str'=>"#{exc.to_s}\n#{exc.backtrace.to_a.join("\n")}", 'signal'=>500}
87
+ end
84
88
  unless response
85
89
  #re-queue self if no response
86
90
  s.enqueue!
@@ -92,10 +96,10 @@ module Mobilize
92
96
  #retry
93
97
  s.update_attributes(:retries_done => s.retries_done.to_i + 1, :response => response)
94
98
  s.update_status(%{Retry #{s.retries_done.to_s} at #{Time.now.utc}})
99
+ sleep s['delay'].to_i
95
100
  s.enqueue!
96
101
  else
97
102
  #sleep as much as user specifies
98
- sleep s['delay'].to_i
99
103
  s.fail(response)
100
104
  end
101
105
  return true
@@ -111,7 +115,7 @@ module Mobilize
111
115
  r = j.runner
112
116
  dep_jobs = r.jobs.select do |dj|
113
117
  dj.active==true and
114
- dj.trigger.strip.downcase == "after #{j.name}"
118
+ dj.trigger.strip.downcase == "after #{j.name.downcase}"
115
119
  end
116
120
  #put begin/rescue so all dependencies run
117
121
  dep_jobs.each do |dj|
@@ -1,5 +1,5 @@
1
1
  module Mobilize
2
2
  module Base
3
- VERSION = "1.21"
3
+ VERSION = "1.22"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,8 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mobilize-base
3
3
  version: !ruby/object:Gem::Version
4
- version: '1.21'
5
- prerelease:
4
+ version: '1.22'
6
5
  platform: ruby
7
6
  authors:
8
7
  - Cassio Paes-Leme
@@ -14,23 +13,20 @@ dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: rake
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ! '>='
17
+ - - '>='
20
18
  - !ruby/object:Gem::Version
21
19
  version: '0'
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ! '>='
24
+ - - '>='
28
25
  - !ruby/object:Gem::Version
29
26
  version: '0'
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: bson
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
31
  - - '='
36
32
  - !ruby/object:Gem::Version
@@ -38,7 +34,6 @@ dependencies:
38
34
  type: :runtime
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
38
  - - '='
44
39
  - !ruby/object:Gem::Version
@@ -46,7 +41,6 @@ dependencies:
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: bson_ext
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
45
  - - '='
52
46
  - !ruby/object:Gem::Version
@@ -54,7 +48,6 @@ dependencies:
54
48
  type: :runtime
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
52
  - - '='
60
53
  - !ruby/object:Gem::Version
@@ -62,7 +55,6 @@ dependencies:
62
55
  - !ruby/object:Gem::Dependency
63
56
  name: mongo
64
57
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
58
  requirements:
67
59
  - - '='
68
60
  - !ruby/object:Gem::Version
@@ -70,7 +62,6 @@ dependencies:
70
62
  type: :runtime
71
63
  prerelease: false
72
64
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
65
  requirements:
75
66
  - - '='
76
67
  - !ruby/object:Gem::Version
@@ -78,7 +69,6 @@ dependencies:
78
69
  - !ruby/object:Gem::Dependency
79
70
  name: mongoid
80
71
  requirement: !ruby/object:Gem::Requirement
81
- none: false
82
72
  requirements:
83
73
  - - ~>
84
74
  - !ruby/object:Gem::Version
@@ -86,7 +76,6 @@ dependencies:
86
76
  type: :runtime
87
77
  prerelease: false
88
78
  version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
79
  requirements:
91
80
  - - ~>
92
81
  - !ruby/object:Gem::Version
@@ -94,7 +83,6 @@ dependencies:
94
83
  - !ruby/object:Gem::Dependency
95
84
  name: redis
96
85
  requirement: !ruby/object:Gem::Requirement
97
- none: false
98
86
  requirements:
99
87
  - - ~>
100
88
  - !ruby/object:Gem::Version
@@ -102,7 +90,6 @@ dependencies:
102
90
  type: :runtime
103
91
  prerelease: false
104
92
  version_requirements: !ruby/object:Gem::Requirement
105
- none: false
106
93
  requirements:
107
94
  - - ~>
108
95
  - !ruby/object:Gem::Version
@@ -110,7 +97,6 @@ dependencies:
110
97
  - !ruby/object:Gem::Dependency
111
98
  name: resque
112
99
  requirement: !ruby/object:Gem::Requirement
113
- none: false
114
100
  requirements:
115
101
  - - '='
116
102
  - !ruby/object:Gem::Version
@@ -118,7 +104,6 @@ dependencies:
118
104
  type: :runtime
119
105
  prerelease: false
120
106
  version_requirements: !ruby/object:Gem::Requirement
121
- none: false
122
107
  requirements:
123
108
  - - '='
124
109
  - !ruby/object:Gem::Version
@@ -126,7 +111,6 @@ dependencies:
126
111
  - !ruby/object:Gem::Dependency
127
112
  name: google_drive
128
113
  requirement: !ruby/object:Gem::Requirement
129
- none: false
130
114
  requirements:
131
115
  - - '='
132
116
  - !ruby/object:Gem::Version
@@ -134,7 +118,6 @@ dependencies:
134
118
  type: :runtime
135
119
  prerelease: false
136
120
  version_requirements: !ruby/object:Gem::Requirement
137
- none: false
138
121
  requirements:
139
122
  - - '='
140
123
  - !ruby/object:Gem::Version
@@ -142,7 +125,6 @@ dependencies:
142
125
  - !ruby/object:Gem::Dependency
143
126
  name: popen4
144
127
  requirement: !ruby/object:Gem::Requirement
145
- none: false
146
128
  requirements:
147
129
  - - '='
148
130
  - !ruby/object:Gem::Version
@@ -150,7 +132,6 @@ dependencies:
150
132
  type: :runtime
151
133
  prerelease: false
152
134
  version_requirements: !ruby/object:Gem::Requirement
153
- none: false
154
135
  requirements:
155
136
  - - '='
156
137
  - !ruby/object:Gem::Version
@@ -158,7 +139,6 @@ dependencies:
158
139
  - !ruby/object:Gem::Dependency
159
140
  name: actionmailer
160
141
  requirement: !ruby/object:Gem::Requirement
161
- none: false
162
142
  requirements:
163
143
  - - '='
164
144
  - !ruby/object:Gem::Version
@@ -166,13 +146,12 @@ dependencies:
166
146
  type: :runtime
167
147
  prerelease: false
168
148
  version_requirements: !ruby/object:Gem::Requirement
169
- none: false
170
149
  requirements:
171
150
  - - '='
172
151
  - !ruby/object:Gem::Version
173
152
  version: 3.1.1
174
- description: ! "Manage your organization's workflows entirely through Google Docs
175
- and irb.\n Mobilize schedules jobs, queues workers, sends failure
153
+ description: "Manage your organization's workflows entirely through Google Docs and
154
+ irb.\n Mobilize schedules jobs, queues workers, sends failure
176
155
  notifications, and\n integrates mobilize-hadoop, -http, -mysql,
177
156
  and -mongodb packages\n to allow seamless transport of TSV and
178
157
  JSON data between any two endpoints. "
@@ -227,33 +206,26 @@ files:
227
206
  - test/test_helper.rb
228
207
  homepage: http://github.com/ngmoco/mobilize-base
229
208
  licenses: []
209
+ metadata: {}
230
210
  post_install_message:
231
211
  rdoc_options: []
232
212
  require_paths:
233
213
  - lib
234
214
  required_ruby_version: !ruby/object:Gem::Requirement
235
- none: false
236
215
  requirements:
237
- - - ! '>='
216
+ - - '>='
238
217
  - !ruby/object:Gem::Version
239
218
  version: '0'
240
- segments:
241
- - 0
242
- hash: -779257039154498150
243
219
  required_rubygems_version: !ruby/object:Gem::Requirement
244
- none: false
245
220
  requirements:
246
- - - ! '>='
221
+ - - '>='
247
222
  - !ruby/object:Gem::Version
248
223
  version: '0'
249
- segments:
250
- - 0
251
- hash: -779257039154498150
252
224
  requirements: []
253
225
  rubyforge_project: mobilize-base
254
- rubygems_version: 1.8.25
226
+ rubygems_version: 2.0.3
255
227
  signing_key:
256
- specification_version: 3
228
+ specification_version: 4
257
229
  summary: Moves datasets and schedules data transfers using MongoDB, Resque and Google
258
230
  Docs
259
231
  test_files: