Skip to content

Commit

Permalink
feat(search): update benthos with payments pools
Browse files Browse the repository at this point in the history
  • Loading branch information
paul-nicolas committed Dec 7, 2023
1 parent 3868646 commit 1949c28
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 0 deletions.
32 changes: 32 additions & 0 deletions ee/search/benthos/streams/payments/v0.0.0/payments_deletion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ pipeline:
"kind": "PAYMENT"
}
},
{
"match": {
"kind": "PAYMENT_POOL"
}
},
{
"match": {
"kind": "PAYMENT_ACCOUNT"
Expand Down Expand Up @@ -60,6 +65,33 @@ pipeline:
}
}
- label: DELETED_POOL
processors:
- bloblang: |
root = {
"query": {
"bool": {
"must": [
{
"match": {
"kind": "PAYMENT_POOL"
}
},
{
"match": {
"indexed.id": this.payload.id
}
},
{
"match": {
"stack": env("STACK")
}
}
]
}
}
}
- label: DELETED_TRANSFER_INITIATION
processors:
- bloblang: |
Expand Down
18 changes: 18 additions & 0 deletions ee/search/benthos/streams/payments/v0.0.0/payments_ingestion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,24 @@ pipeline:
"action": "index",
"id": "PAYMENT-BANK-ACCOUNT-%s".format(this.payload.id)
}
- label: SAVED_POOL
processors:
- bloblang: |
root = {
"document": {
"data": this.payload,
"indexed": {
"id": this.payload.id,
"createdAt": this.payload.createdAt,
"name": this.payload.name,
"accountIDs": this.payload.accountIDs,
},
"kind": "PAYMENT_POOL",
"when": this.date
},
"action": "index",
"id": "PAYMENT-POOL-%s".format(this.payload.id)
}
- label: SAVED_TRANSFER_INITIATION
processors:
- bloblang: |
Expand Down

0 comments on commit 1949c28

Please sign in to comment.