Skip to content

Commit

Permalink
custom data type updater: set _standard
Browse files Browse the repository at this point in the history
see #73959
  • Loading branch information
martinrode committed Nov 6, 2024
1 parent 10b5994 commit e6019a0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions customDataTypeUpdater/update.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ main = (payload) => {
payload.objects[i].data._expires_at = (new Date()).AddMinutes(2).toISOString()
// increment version. this is checked by apitest test/api/db/custom_data_type_updater
payload.objects[i].data.version++
payload.objects[i].data._standard = {
text: "custom "+payload.objects[i].data.idx+" v"+payload.objects[i].data.version
}
console.error("data", i, payload.objects[i].data.numberfield)
}
// add a dup, so fylr learns how to de dup the data
Expand All @@ -36,6 +39,7 @@ main = (payload) => {
payload.objects[0] = JSON.parse(JSON.stringify(payload.objects[1]))
payload.objects[0].identifier = id
}

outputData({
"payload": payload.objects,
"log": [payload.objects.length+" objects in payload"]
Expand Down
2 changes: 1 addition & 1 deletion fas_config/cookbook_metadata_example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ recipes:
- file: "example_metadata.json"
displayname:
de-DE: Beispiel Metadaten Mapping
en-US: Beispiel Metadaten Mapping
en-US: Example Metadaten Mapping
mapping:
exec:
service: node
Expand Down
2 changes: 2 additions & 0 deletions manifest.master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,9 @@ custom_types:
- type: "value"
value: "%info.json%"
timeout: 60
# Defaults to 100, will be set to maxium 100
batch_size: 10
# Defaults to 30
expires_days: 1

fas_config:
Expand Down

0 comments on commit e6019a0

Please sign in to comment.