wco_email 0.1.1.23 → 0.1.1.25
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/tasks/wco_email_tasks.rake +10 -10
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 161fd895db8e2ebbc794fef09f04b1fea75d5f77fe07024ff84bf600673a2d50
|
4
|
+
data.tar.gz: 133c6d59f0539403191596036a1fde5207126f0ae8fd1c5928de226207ad16e5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eb4f68b6944c8ca0ea04ad58289642ce71430a2a4cd30df0189fa5d8eb6b8d5921af6e8561ab1b40a7905e2baab280cd4d1592b9915317395b48f39d85c7da26
|
7
|
+
data.tar.gz: 49bd4e32ec20d07cbe9cbe242c3849eac1d3df316a194a197cb49c9cdb2595b8774a3682956f2412209fe43d0bb62d89c303d06fb4010d39c2c0436ed987e1a0
|
@@ -39,7 +39,7 @@ namespace :wco_email do
|
|
39
39
|
WcoEmail::MessageIntakeJob.perform_sync( stub.id.to_s )
|
40
40
|
|
41
41
|
sleep 1 # second
|
42
|
-
|
42
|
+
print '.'
|
43
43
|
end
|
44
44
|
end
|
45
45
|
|
@@ -66,7 +66,7 @@ namespace :wco_email do
|
|
66
66
|
object_key = line.split.last
|
67
67
|
stub = WcoEmail::MessageStub.create( object_key: object_key, bucket: bucket )
|
68
68
|
if stub.persisted?
|
69
|
-
|
69
|
+
print "#{idx+1}."
|
70
70
|
else
|
71
71
|
puts! stub.errors.full_messages.join(", ")
|
72
72
|
end
|
@@ -120,7 +120,7 @@ namespace :wco_email do
|
|
120
120
|
outs = outs.to_a
|
121
121
|
outs.each do |out|
|
122
122
|
WcoEmail::Message.where( message_id: out['message_id'] )[1].destroy!
|
123
|
-
|
123
|
+
print '.'
|
124
124
|
end
|
125
125
|
end
|
126
126
|
|
@@ -134,7 +134,7 @@ namespace :wco_email do
|
|
134
134
|
outs = outs.to_a
|
135
135
|
outs.each do |out|
|
136
136
|
WcoEmail::MessageStub.where( object_key: out['object_key'] )[1].destroy!
|
137
|
-
|
137
|
+
print '.'
|
138
138
|
end
|
139
139
|
end
|
140
140
|
|
@@ -144,14 +144,14 @@ namespace :wco_email do
|
|
144
144
|
while true do
|
145
145
|
|
146
146
|
schs = WcoEmail::EmailAction.active.where({ :perform_at.lte => Time.now })
|
147
|
-
|
147
|
+
print "[#{schs.length}]" if schs.length != 0
|
148
148
|
schs.each do |sch|
|
149
149
|
sch.send_and_roll
|
150
|
-
|
150
|
+
print '^'
|
151
151
|
sleep 1
|
152
152
|
end
|
153
153
|
|
154
|
-
|
154
|
+
print '.'
|
155
155
|
sleep 15
|
156
156
|
end
|
157
157
|
end
|
@@ -161,7 +161,7 @@ namespace :wco_email do
|
|
161
161
|
while true do
|
162
162
|
|
163
163
|
ctxs = WcoEmail::Context.scheduled.notsent
|
164
|
-
|
164
|
+
print "sending[#{ctxs.length}]"
|
165
165
|
ctxs.map do |ctx|
|
166
166
|
|
167
167
|
unsub = WcoEmail::Unsubscribe.where({ lead_id: ctx.lead_id, template_id: ctx.email_template_id }).first
|
@@ -182,12 +182,12 @@ namespace :wco_email do
|
|
182
182
|
Rails.env.production? ? out.deliver_later : out.deliver_now
|
183
183
|
end
|
184
184
|
|
185
|
-
|
185
|
+
print '^'
|
186
186
|
sleep 1
|
187
187
|
end
|
188
188
|
|
189
189
|
sleep 15
|
190
|
-
|
190
|
+
print '.'
|
191
191
|
|
192
192
|
end
|
193
193
|
end
|