wco_email 0.1.1.19 → 0.1.1.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5369a647f1f785491071fdd4dee5c1ce2cafbe5189380df090c44acd65039c30
4
- data.tar.gz: 6552d3a6fd26b6d012913c12551f13c95e90350e86cad5a6e2d1d4a9625edaa1
3
+ metadata.gz: b01a6b1ee09a45423d8e527c68a537da87e3878695e10c43be9819927a8f411e
4
+ data.tar.gz: 2f835a2cb7b02a9d27001df259f5d5f2b18cee6fdc94c3fa46d4cf7ae3247e9d
5
5
  SHA512:
6
- metadata.gz: 3eef294154e5d93522360d143226b9e5d92ce1180ed3d3f7c9c2547fadca31c6185992784ea69bf2eebe1e19aea507a51915b9beeb20d6d25926327250e29329
7
- data.tar.gz: c80d75adc3261eb8acac25fd6af78246c277ed98459342363b7e90fa8743bca9e27f8ad1964387d8a4859a12f03142ba1d9fc9c17ca9d124b948e40ca3dc7349
6
+ metadata.gz: e0a5f78294c1607b426964299e88ec54eb44e9daf910911b9127903b23fa4a19f368c7b304e1dce5da2c4a6300d59b5369fbb595789440fc0ef03ecb9b12c836
7
+ data.tar.gz: 2ea4cb7770d4887f8b7f9346d3e225933aa8d099620f97d051b970350064c646394e6208b9a5ac507972dcc2b75648fb003d2eef1624b007a8bd04fe98a4b5bf
@@ -34,7 +34,7 @@ class WcoEmail::EmailFiltersController < WcoEmail::ApplicationController
34
34
  def index
35
35
  authorize! :index, WcoEmail::EmailFilter.new
36
36
  @email_filter = WcoEmail::EmailFilter.new
37
- @email_filters = WcoEmail::EmailFilter.all.page( params[WcoEmail::EmailFilter::PAGE_PARAM_NAME] ).per( current_profile.per_page )
37
+ @email_filters = WcoEmail::EmailFilter.all # .page( params[WcoEmail::EmailFilter::PAGE_PARAM_NAME] ).per( current_profile.per_page )
38
38
  end
39
39
 
40
40
  def new
@@ -12,7 +12,7 @@
12
12
  = render 'form', email_filter: @email_filter
13
13
  %hr
14
14
 
15
- = paginate @email_filters, param_name: WcoEmail::EmailFilter::PAGE_PARAM_NAME, views_prefix: 'wco'
15
+ -# = paginate @email_filters, param_name: WcoEmail::EmailFilter::PAGE_PARAM_NAME, views_prefix: 'wco'
16
16
  %table.bordered.data-table
17
17
  %thead
18
18
  %tr
@@ -47,5 +47,6 @@
47
47
  %td= ef.email_template&.slug
48
48
  %td= ef.email_action_template&.slug
49
49
  %td= ef.tag&.slug
50
+ -# = paginate @email_filters, param_name: WcoEmail::EmailFilter::PAGE_PARAM_NAME, views_prefix: 'wco'
50
51
 
51
52
 
@@ -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.21
5
5
  platform: ruby
6
6
  authors:
7
7
  - Victor Pudeyev
@@ -451,7 +451,6 @@ files:
451
451
  - config/initializers/assets.rb
452
452
  - config/routes.rb
453
453
  - config/trash/credentials.yml.enc
454
- - lib/systemd/system/wco_email_sidekiq.service
455
454
  - lib/tasks/bjjcollective/sitemap.rb
456
455
  - lib/tasks/db_tasks.rake
457
456
  - lib/tasks/direct_mail_tasks.rake
@@ -1,22 +0,0 @@
1
- [Unit]
2
- Description=wco_email_rb_sidekiq
3
-
4
- [Service]
5
- Type=simple
6
- User=root
7
- WorkingDirectory=/opt/projects/micros_email/current
8
- ExecStart=/root/.rbenv/shims/bundle exec sidekiq -q wco_email_rb -q wco_email_rb_mailers
9
- ExecStop=/bin/echo nothing
10
- Restart=on-failure
11
- Environment=RAILS_ENV=production
12
- Environment=RAILS_LOG_TO_STDOUT=true
13
-
14
- StandardOutput=syslog
15
- StandardError=syslog
16
- SyslogIdentifier=wco_email_rb_sidekiq
17
-
18
- # StandardOutput=append:/var/log/sidekiq/production.log
19
- # StandardError=append:/var/log/sidekiq/production.log
20
-
21
- [Install]
22
- WantedBy=multi-user.target