wco_email 0.1.1.18 → 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: 46fa28090eb28cbd8c6526e3466bd5079bf031b3f2aa6c5ba0b2dd0c392f7c33
4
- data.tar.gz: b3890a89e8bee46555152d8b80075238ace3ad884b31b5fcd88f2981bf2e85a3
3
+ metadata.gz: 97c202bd2824d215580b7b8f1f49f874fa2b1f96e0279823a0fd24932f707a59
4
+ data.tar.gz: ac52cc83daf424d26bd3596c4419a8bd495f62605714b0e1b605b6bbda7d3e64
5
5
  SHA512:
6
- metadata.gz: 183d7bd1019facd3066d5f8adcbc29effa4cafd7b14ed68bd2e055d806a570dff299cb275d6585311fa955f0764dd21a61411ae669741aafe118793a12c574e1
7
- data.tar.gz: 74fef28f5f59ec5f3d72f6126e20cfc23f30e42e84585b5c63b56135675c9d7000b79af432036fc64a7cca5a292db91d5181d01dc17f9ad84b3c78dbb7f042ab
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,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wco_email
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1.18
4
+ version: 0.1.1.20
5
5
  platform: ruby
6
6
  authors:
7
7
  - Victor Pudeyev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-01-13 00:00:00.000000000 Z
11
+ date: 2024-01-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-s3