wco_email 0.1.1.14 → 0.1.1.16

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: 38dd6949cfd54cf62dc22d578f5c92d1b15901828e817ca200a7bff21744a9e0
4
- data.tar.gz: 1d34eebffc81223a0f39fecee5446b40d1218c658406400550499ab3e45cc21e
3
+ metadata.gz: 1253b7ed85554d1a4a58ea6a7a080dac2b18abb7ea82cf03ae5c1150d7a0b8d3
4
+ data.tar.gz: 23e8fbdb9b10428c8d2b5e4e82d5bff4ef26db882f24402b79a8d7dbd4debff8
5
5
  SHA512:
6
- metadata.gz: 7687dd90c43ef617b71aa6dcfe42d41ba2454636f94c964d42f78ff749091295fcfd497380e09b6c78b4c7e06d290506b8b6bdeab4fa6e95eeb829ef4ba7e066
7
- data.tar.gz: 26db851105b6b38d5d2c0cee3a8e750473f04d98085794490116f182e124e013f591f9f0f71d0f55ad78e704e91735226afc0803d0c820b1a7ee7e0b4851e15a
6
+ metadata.gz: 885ccc782291190ca038aa9bea5a77a54d823a5bc7266da3248f0453e7b1345a437877e5cc6fd230587082d2e5e4fc23cf200887597021966fb81fe2cda41d33
7
+ data.tar.gz: c198d369614b352734192d323badaa58fd58be4177954d2ab5473104db533763bfe48fe89bc66cb750b27268a9723bf0ac284a46bfe9d14bab0fd644bb888c5e
@@ -11,7 +11,7 @@
11
11
  %th= check_box_tag 'hmm'
12
12
  %th  
13
13
  %th Slug
14
- %th From
14
+ -# %th From
15
15
  %th Tmpl
16
16
  %th next actions
17
17
  - @tmpls.each_with_index do |tmpl, idx|
@@ -26,8 +26,7 @@
26
26
 
27
27
  %td
28
28
  = tmpl.slug
29
- %td
30
- = tmpl.from_email
29
+ -# %td= tmpl.from_email
31
30
  %td.tmpl
32
31
  = render '/wco_email/email_templates/show_cell', tmpl: tmpl.email_template
33
32
 
@@ -37,6 +37,9 @@ namespace :wco_email do
37
37
  stub.save!
38
38
 
39
39
  WcoEmail::MessageIntakeJob.perform_sync( stub.id.to_s )
40
+
41
+ sleep 1 # second
42
+ print '.'
40
43
  end
41
44
  end
42
45
 
@@ -107,6 +110,20 @@ namespace :wco_email do
107
110
  puts "ok"
108
111
  end
109
112
 
113
+ desc 'remove message duplicates'
114
+ task remove_message_duplicates: :environment do
115
+ outs = WcoEmail::Message.collection.aggregate([
116
+ {"$group" => { "_id" => "$message_id", "count" => { "$sum" => 1 } } },
117
+ {"$match": {"_id" => { "$ne" => nil } , "count" => {"$gt" => 1} } },
118
+ {"$project" => {"message_id" => "$_id", "_id" => 0} }
119
+ ])
120
+ outs = outs.to_a
121
+ outs.each do |out|
122
+ WcoEmail::Message.where( message_id: out['message_id'] )[1].destroy!
123
+ print '.'
124
+ end
125
+ end
126
+
110
127
  desc 'remove duplicates of stubs'
111
128
  task remove_stub_duplicates: :environment do
112
129
  outs = WcoEmail::MessageStub.collection.aggregate([
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.14
4
+ version: 0.1.1.16
5
5
  platform: ruby
6
6
  authors:
7
7
  - Victor Pudeyev