wco_email 0.1.1.19 → 0.1.1.20

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5369a647f1f785491071fdd4dee5c1ce2cafbe5189380df090c44acd65039c30
4
- data.tar.gz: 6552d3a6fd26b6d012913c12551f13c95e90350e86cad5a6e2d1d4a9625edaa1
3
+ metadata.gz: 97c202bd2824d215580b7b8f1f49f874fa2b1f96e0279823a0fd24932f707a59
4
+ data.tar.gz: ac52cc83daf424d26bd3596c4419a8bd495f62605714b0e1b605b6bbda7d3e64
5
5
  SHA512:
6
- metadata.gz: 3eef294154e5d93522360d143226b9e5d92ce1180ed3d3f7c9c2547fadca31c6185992784ea69bf2eebe1e19aea507a51915b9beeb20d6d25926327250e29329
7
- data.tar.gz: c80d75adc3261eb8acac25fd6af78246c277ed98459342363b7e90fa8743bca9e27f8ad1964387d8a4859a12f03142ba1d9fc9c17ca9d124b948e40ca3dc7349
6
+ metadata.gz: 4181db820862752a40fd6c69ab5868f156f4c3b419e1317316feead4bbb18a0817c323b6d6998c7c945959b546576d0e7d34d212f8813e5aa8bce6e916508723
7
+ data.tar.gz: 72a3a5e00e4b7a3c762bca79b579b6341355b604df1bba99faf911ddce0727960efc20e85a3ab648cba8cf2b615f81f9badd8b5436760b5c2110b4ddaa32a9b9
@@ -142,13 +142,15 @@ namespace :wco_email do
142
142
  task run_email_actions: :environment do
143
143
  while true do
144
144
 
145
- WcoEmail::EmailAction.active.where({ :perform_at.lte => Time.now }).each do |sch|
145
+ schs = WcoEmail::EmailAction.active.where({ :perform_at.lte => Time.now })
146
+ print "run_email_actions[#{schs.length}]"
147
+ schs.each do |sch|
146
148
  sch.send_and_roll
147
149
  print '^'
150
+ sleep 1
148
151
  end
149
152
 
150
- duration = Rails.env.production? ? 15 : 15 # 2 minutes or 15 seconds
151
- sleep duration
153
+ sleep 15
152
154
  print '.'
153
155
 
154
156
  end
@@ -159,6 +161,7 @@ namespace :wco_email do
159
161
  while true do
160
162
 
161
163
  ctxs = WcoEmail::Context.scheduled.notsent
164
+ print "sending[#{ctxs.length}]"
162
165
  ctxs.map do |ctx|
163
166
 
164
167
  unsub = WcoEmail::Unsubscribe.where({ lead_id: ctx.lead_id, template_id: ctx.email_template_id }).first
@@ -180,10 +183,10 @@ namespace :wco_email do
180
183
  end
181
184
 
182
185
  print '^'
186
+ sleep 1
183
187
  end
184
188
 
185
- duration = Rails.env.production? ? 15 : 15 # 2 minutes or 15 seconds
186
- sleep duration
189
+ sleep 15
187
190
  print '.'
188
191
 
189
192
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wco_email
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1.19
4
+ version: 0.1.1.20
5
5
  platform: ruby
6
6
  authors:
7
7
  - Victor Pudeyev