huginn_acumen_product_agent 2.1.0 → 2.2.0
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 +4 -4
- data/lib/huginn_acumen_product_agent/concerns/acumen_query_concern.rb +0 -2
- data/lib/huginn_acumen_product_agent/concerns/alternate_products_query_concern.rb +1 -1
- data/lib/huginn_acumen_product_agent/concerns/inv_product_query_concern.rb +4 -1
- data/lib/huginn_acumen_product_agent/concerns/inv_status_query_concern.rb +2 -2
- data/lib/huginn_acumen_product_agent/concerns/prod_mkt_query_concern.rb +2 -2
- data/lib/huginn_acumen_product_agent/concerns/product_contributors_query_concern.rb +1 -1
- metadata +2 -3
- data/lib/huginn_acumen_product_agent/concerns/agent_error_concern.rb +0 -19
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f92df5343f7bddce53b734d7e08b20163fc02b159da82accf2b774cb5eb4d095
|
4
|
+
data.tar.gz: 9ce26767383ff1b75aa168cc70291b98def9028bac9e41f827e2ffa2bc9155dd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 13f0a7b2b285fb4399026bbf68724557b0da9735a7e5cf055d928b402b3050d8e5137e8acd799dc9b7f26c9e5b836e4a5c636fe7dd079c4d7b5956973d8aa645
|
7
|
+
data.tar.gz: 83fc6b6c51dab7825ba6eda45ac7f1aafaa44153274acc57b907ee48542067e7b654f8c74f1bfa5865a16ddeffd20c9d7d5e6b5fa113b98868ef6152198bee68
|
@@ -63,7 +63,7 @@ module AlternateProductsQueryConcern
|
|
63
63
|
issue_error(AcumenAgentError.new(
|
64
64
|
'process_alternate_format_response',
|
65
65
|
'Failed while processing alternate format links',
|
66
|
-
|
66
|
+
{ product_id: get_field_value(link, 'Product_Link.Link_From_ID') },
|
67
67
|
error
|
68
68
|
))
|
69
69
|
end
|
@@ -129,7 +129,10 @@ module InvProductQueryConcern
|
|
129
129
|
issue_error(AcumenAgentError.new(
|
130
130
|
'process_inv_product_response',
|
131
131
|
'Failed to load Inventory Product Records',
|
132
|
-
{
|
132
|
+
{
|
133
|
+
product_id: get_field_value(p, 'Inv_Product.ID'),
|
134
|
+
sku: get_field_value(p, 'Inv_Product.ProdCode')
|
135
|
+
},
|
133
136
|
error,
|
134
137
|
))
|
135
138
|
|
@@ -34,7 +34,7 @@ module ProdMktQueryConcern
|
|
34
34
|
issue_error(AcumenAgentError.new(
|
35
35
|
'process_inv_status_response',
|
36
36
|
'Failed while processing Prod_Mkt record',
|
37
|
-
inv_status,
|
37
|
+
{ sku: get_field_value(inv_status, 'Inv_Status.ProdCode') },
|
38
38
|
error,
|
39
39
|
))
|
40
40
|
end
|
@@ -63,7 +63,7 @@ module ProdMktQueryConcern
|
|
63
63
|
issue_error(AcumenAgentError.new(
|
64
64
|
'map_inv_status_data',
|
65
65
|
'Failed to map inventory data for product',
|
66
|
-
{
|
66
|
+
{ sku: product['sku'] },
|
67
67
|
error,
|
68
68
|
))
|
69
69
|
end
|
@@ -62,7 +62,7 @@ module ProdMktQueryConcern
|
|
62
62
|
issue_error(AcumenAgentError.new(
|
63
63
|
'process_prod_mkt_response',
|
64
64
|
'Failed while processing Prod_Mkt record',
|
65
|
-
product_marketing,
|
65
|
+
{ sku: get_field_value(product_marketing, 'ProdMkt.Product_Code') },
|
66
66
|
error,
|
67
67
|
))
|
68
68
|
end
|
@@ -150,7 +150,7 @@ module ProdMktQueryConcern
|
|
150
150
|
issue_error(AcumenAgentError.new(
|
151
151
|
'map_marketing_data',
|
152
152
|
'Failed to map marketing data for product',
|
153
|
-
{
|
153
|
+
{ id: product['identifier'], sku: marketing['sku'] },
|
154
154
|
error,
|
155
155
|
))
|
156
156
|
end
|
@@ -104,7 +104,7 @@ module ProductContributorsQueryConcern
|
|
104
104
|
issue_error(AcumenAgentError.new(
|
105
105
|
'map_contributor_data',
|
106
106
|
'Failed while mapping contributor data to products',
|
107
|
-
{
|
107
|
+
{ id: product['identifier'], sku: product['sku'] },
|
108
108
|
error
|
109
109
|
))
|
110
110
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: huginn_acumen_product_agent
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jacob Spizziri
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-05-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -67,7 +67,6 @@ files:
|
|
67
67
|
- lib/huginn_acumen_product_agent/acumen_client.rb
|
68
68
|
- lib/huginn_acumen_product_agent/acumen_product_agent.rb
|
69
69
|
- lib/huginn_acumen_product_agent/concerns/acumen_query_concern.rb
|
70
|
-
- lib/huginn_acumen_product_agent/concerns/agent_error_concern.rb
|
71
70
|
- lib/huginn_acumen_product_agent/concerns/alternate_products_query_concern.rb
|
72
71
|
- lib/huginn_acumen_product_agent/concerns/inv_product_query_concern.rb
|
73
72
|
- lib/huginn_acumen_product_agent/concerns/inv_status_query_concern.rb
|
@@ -1,19 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module AgentErrorConcern
|
4
|
-
extend ActiveSupport::Concern
|
5
|
-
|
6
|
-
def issue_error(error, status = 500)
|
7
|
-
# NOTE: Status is intentionally included on the top-level payload so that other
|
8
|
-
# agents can look for a `payload[:status]` of either 200 or 500 to distinguish
|
9
|
-
# between success and failure states
|
10
|
-
create_event payload: {
|
11
|
-
status: status,
|
12
|
-
scope: error.scope,
|
13
|
-
message: error.message,
|
14
|
-
original_error: error.original_error,
|
15
|
-
data: error.data,
|
16
|
-
trace: error.original_error.backtrace,
|
17
|
-
}
|
18
|
-
end
|
19
|
-
end
|