herdst_worker 0.2.4 → 0.2.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/herdst_worker/queue/facade.rb +4 -2
- data/lib/herdst_worker/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f923f35476bb893010b8dfe3fd0ecd8d60cfe599d21b187d1ef2c615e721a8c0
|
4
|
+
data.tar.gz: db24d82e075659d3cdb955e184f0504d44769f615341c53e33a8140ea022ed3d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 94aaf2d09122cdb0eb8b386cb91f3207d7cbb1a98dfc7ad3bbfecbcdedbded460162c73fd4d83daae306d885de83be76c517eb2efc27b0109c0c04302cf7cf12
|
7
|
+
data.tar.gz: 4c1a7e468c82f9467eb6a57d020d5e64057185b15399ab8c8debae202eca047d2fd7fcae5ebed9da67a4a277ffb513ce6de8d6cd0eb9581c76040b9f40fd6a07
|
@@ -92,6 +92,8 @@ module HerdstWorker
|
|
92
92
|
|
93
93
|
|
94
94
|
def create_email_queue_message(template, company, message_data, attributes = nil, delay = 2)
|
95
|
+
company_key = company.class.name.downcase.to_sym
|
96
|
+
|
95
97
|
# Convert instances of ApplicationRecord to attributes instead of json representation
|
96
98
|
message_data.each do |key, value|
|
97
99
|
message_data[key] = value.attributes if value.is_a?(ActiveRecord::Base)
|
@@ -108,8 +110,8 @@ module HerdstWorker
|
|
108
110
|
data[:type] = "email"
|
109
111
|
data[:template] = template
|
110
112
|
data[:data] = message_data || {}
|
111
|
-
data[:data][
|
112
|
-
|
113
|
+
data[:data][company_key] = company unless data[:data][company_key].present?
|
114
|
+
|
113
115
|
# Add message structure
|
114
116
|
message = Hash.new
|
115
117
|
message[:id] = SecureRandom.hex(32)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: herdst_worker
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Herd.St
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-10-
|
11
|
+
date: 2023-10-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|