Skip to content

Commit

Permalink
fix(jobs): re-arange import order
Browse files Browse the repository at this point in the history
  • Loading branch information
Gerald Baulig committed Jul 10, 2024
1 parent aa31812 commit e5e6471
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 30 deletions.
12 changes: 6 additions & 6 deletions datasets/demo-shop/jobs/job_master.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@
"concurrency": 1
},
"tasks": [
{
"name": "organizations",
"operation": "sync",
"filter": "organizations.yaml",
"mutation": "mutation mutateOrganizations($var: [IIoRestorecommerceOrganizationOrganization!]!){ master_data { organization { Mutate( input: { items: $var, totalCount: 0, mode: UPSERT } ) { details{items {status {id, code, message}}, operationStatus { code message } } } } } }"
},
{
"name": "addresses",
"operation": "sync",
Expand All @@ -16,12 +22,6 @@
"filter": "contact_points.yaml",
"mutation": "mutation{ master_data { contact_point { Mutate( input: { items: ${resource_list}, totalCount: 0, mode: UPSERT } ) { details{items {status {id, code, message}}, operationStatus { code message } } } } } }"
},
{
"name": "organizations",
"operation": "sync",
"filter": "organizations.yaml",
"mutation": "mutation mutateOrganizations($var: [IIoRestorecommerceOrganizationOrganization!]!){ master_data { organization { Mutate( input: { items: $var, totalCount: 0, mode: UPSERT } ) { details{items {status {id, code, message}}, operationStatus { code message } } } } } }"
},
{
"name": "customers",
"operation": "sync",
Expand Down
12 changes: 0 additions & 12 deletions datasets/system/data/seed-data/organizations.yaml
Original file line number Diff line number Diff line change
@@ -1,19 +1,7 @@
---
id: system
name: SYSTEM
contactPointIds: []
website: ""
email: ""
vatId: ""
isicV4: ""
registration: ""
logo:
url: ""
registrationCourt: ""
paymentMethodIds: []
parentId: ""
meta:
modifiedBy: ""
owners:
- id: urn:restorecommerce:acs:names:ownerIndicatoryEntity
value: urn:restorecommerce:acs:model:organization.Organization
Expand Down
3 changes: 0 additions & 3 deletions datasets/system/generator/unit-codes/transform.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,6 @@ function transform() {
code.id = 'un-cefact-cc-' + code.commonCode;

code.meta = {
created: new Date().toISOString(),
modified: new Date().toISOString(),
modifiedBy: '',
owners: [
{
id: 'urn:restorecommerce:acs:names:ownerIndicatoryEntity',
Expand Down
2 changes: 1 addition & 1 deletion datasets/system/jobs/job_extra.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"operation": "sync",
"filter": "unit_codes*.yaml",
"batchSize": 100,
"mutation": "mutation mutateCodes($var: [IIoRestorecommerceUnitCodeUnitCode!]!){ master_data { unit_code { Mutate( input: { items: $var, totalCount: 0, mode: UPSERT } ) { details{items {status {id, code, message}}, operationStatus { code message } } } } }}"
"mutation": "mutation mutateUnitCodes($var: [IIoRestorecommerceUnitCodeUnitCode!]!){ master_data { unit_code { Mutate( input: { items: $var, totalCount: 0, mode: UPSERT } ) { details{items {status {id, code, message}}, operationStatus { code message } } } } }}"
}
]
}
12 changes: 6 additions & 6 deletions datasets/system/jobs/job_master.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@
"concurrency": 1
},
"tasks": [
{
"name": "organizations",
"operation": "sync",
"filter": "organizations.yaml",
"mutation": "mutation mutateOrganizations($var: [IIoRestorecommerceOrganizationOrganization!]!){ master_data { organization { Mutate( input: { items: $var, totalCount: 0, mode: UPSERT } ) { details{items {status {id, code, message}}, operationStatus { code message } } } } }}"
},
{
"name": "countries",
"operation": "sync",
Expand Down Expand Up @@ -45,12 +51,6 @@
"operation": "sync",
"filter": "contact_point_types.yaml",
"mutation": "mutation{ master_data { contact_point_type { Mutate( input: { items: ${resource_list}, totalCount: 0, mode: UPSERT } ) { details{items {status {id, code, message}}, operationStatus { code message } } } } }}"
},
{
"name": "organizations",
"operation": "sync",
"filter": "organizations.yaml",
"mutation": "mutation mutateOrganizations($var: [IIoRestorecommerceOrganizationOrganization!]!){ master_data { organization { Mutate( input: { items: $var, totalCount: 0, mode: UPSERT } ) { details{items {status {id, code, message}}, operationStatus { code message } } } } }}"
}
]
}
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@
"scripts": {
"build": "tsc -d -P tsconfig.objects.json",
"import": "npm-run-all import:system import:demoshop",
"import:system": "npm-run-all import:system:master import:system:identity import:system:rules import:system:extra",
"import:system:master": "node dataset.js import -d system -j master",
"import:system": "npm-run-all import:system:identity import:system:master import:system:extra",
"import:system:rules": "node dataset.js import -d system -j rules",
"import:system:identity": "node dataset.js import -d system -j identity",
"import:system:master": "node dataset.js import -d system -j master",
"import:system:extra": "node dataset.js import -d system -j extra",
"import:demoshop": "npm-run-all import:demoshop:master import:demoshop:catalog import:demoshop:fulfillment",
"import:demoshop:master": "node dataset.js import -d demo-shop -j master",
Expand Down

0 comments on commit e5e6471

Please sign in to comment.