wco_email 0.1.1.10 → 0.1.1.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/wco_email/email_filters_controller.rb +1 -1
- data/app/jobs/wco_email/message_intake_job.rb +2 -1
- data/app/views/wco_email/email_filters/_form.haml +3 -3
- data/app/views/wco_email/email_filters/index.haml +5 -5
- data/lib/tasks/wco_email_tasks.rake +6 -4
- 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: 57871044dbe34a83eb21daf21efce6e5f80f58a4d05002e335a5de68708c9db2
|
4
|
+
data.tar.gz: e3813b3170e891df5f8d49168b319823f7eaa935ca4aa2f4e21606eba5cbf49c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 67012b8a6f4a425ebc669e3b31aef2ae94305e59774052e1e122a98f9f1878a48d890dca3f2f1661e0a53e818abe76bfe4565b85c7c5e9bd9517c60d46e49750
|
7
|
+
data.tar.gz: e1958e70b7e6f17f4c3507dee615fd21567385d51097b51cbdaafd4493f76a40b7c94eae06e6da3057db4c2b54bbd0717157fe94e51e9ae0225c15acb3c3db50
|
@@ -60,7 +60,7 @@ class WcoEmail::EmailFiltersController < WcoEmail::ApplicationController
|
|
60
60
|
private
|
61
61
|
|
62
62
|
def set_lists
|
63
|
-
|
63
|
+
@tags_list = Wco::Tag.list
|
64
64
|
@email_templates_list = WcoEmail::EmailTemplate.list
|
65
65
|
@email_actions_list = WcoEmail::EmailAction.list
|
66
66
|
@email_action_templates_list = WcoEmail::EmailActionTemplate.list
|
@@ -2,6 +2,7 @@
|
|
2
2
|
require 'aws-sdk-s3'
|
3
3
|
require 'mail'
|
4
4
|
require 'sidekiq'
|
5
|
+
require 'exception_notification'
|
5
6
|
|
6
7
|
##
|
7
8
|
## 2023-02-26 _vp_ Let's go
|
@@ -40,7 +41,7 @@ class WcoEmail::MessageIntakeJob
|
|
40
41
|
stub.do_process
|
41
42
|
rescue => err
|
42
43
|
puts! err, "WcoEmail::MessageIntakeJob error"
|
43
|
-
ExceptionNotifier.notify_exception(
|
44
|
+
::ExceptionNotifier.notify_exception(
|
44
45
|
err,
|
45
46
|
data: { stub: stub }
|
46
47
|
)
|
@@ -33,8 +33,8 @@
|
|
33
33
|
.field
|
34
34
|
= f.label :email_action_template
|
35
35
|
= f.select :email_action_template, options_for_select( @email_action_templates_list, selected: email_filter.email_action_template ), {}, class: 'select2'
|
36
|
-
|
37
|
-
|
38
|
-
|
36
|
+
.field
|
37
|
+
= f.label :tag
|
38
|
+
= f.select :tag, options_for_select( @tags_list, selected: email_filter.tag_id ), {}, class: 'select2'
|
39
39
|
.actions
|
40
40
|
= f.submit
|
@@ -24,9 +24,9 @@
|
|
24
24
|
%th Subject Exact
|
25
25
|
%th Body Exact
|
26
26
|
%th Kind
|
27
|
-
|
28
|
-
%th Email Action
|
29
|
-
|
27
|
+
%th Respond with <br />Email Template
|
28
|
+
%th Email Action <br />(template)
|
29
|
+
%th Tag
|
30
30
|
- @email_filters.each_with_index do |ef, idx|
|
31
31
|
|
32
32
|
%tr
|
@@ -44,8 +44,8 @@
|
|
44
44
|
%td= ef.subject_exact
|
45
45
|
%td= ef.body_exact
|
46
46
|
%td= ef.kind
|
47
|
-
|
47
|
+
%td= ef.email_template&.slug
|
48
48
|
%td= ef.email_action_template&.slug
|
49
|
-
|
49
|
+
%td= ef.tag&.slug
|
50
50
|
|
51
51
|
|
@@ -93,22 +93,24 @@ namespace :wco_email do
|
|
93
93
|
desc 'import objectkey list'
|
94
94
|
task import_objectkey_list: :environment do
|
95
95
|
|
96
|
-
bucket = 'ish-ses'
|
96
|
+
# bucket = 'ish-ses'
|
97
|
+
bucket = 'ish-test-2024'
|
97
98
|
client ||= Aws::S3::Client.new({
|
98
99
|
region: ::S3_CREDENTIALS[:region_ses],
|
99
100
|
access_key_id: ::S3_CREDENTIALS[:access_key_id_ses],
|
100
101
|
secret_access_key: ::S3_CREDENTIALS[:secret_access_key_ses],
|
101
102
|
})
|
102
103
|
|
103
|
-
lines = File.read( './data/20240110_ish-ses_objectkeys' )
|
104
|
+
# lines = File.read( './data/20240110_ish-ses_objectkeys' )
|
105
|
+
lines = File.read( './data/out_head' )
|
104
106
|
lines.split("\n").each_with_index do |line, idx|
|
105
107
|
|
106
108
|
object_key = line.split.last
|
107
109
|
stub = WcoEmail::MessageStub.create( object_key: object_key, bucket: bucket )
|
108
110
|
if stub.persisted?
|
109
|
-
print "#{idx}."
|
111
|
+
print "#{idx+1}."
|
110
112
|
else
|
111
|
-
|
113
|
+
puts! stub.errors.full_messages.join(", ")
|
112
114
|
end
|
113
115
|
|
114
116
|
end
|