Skip to content

Commit

Permalink
try fix cadence
Browse files Browse the repository at this point in the history
  • Loading branch information
longquanzheng committed Dec 7, 2024
1 parent 713c5fd commit 705a879
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions service/interpreter/persistence.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,14 @@ func (am *PersistenceManager) LoadDataObjects(

func (am *PersistenceManager) GetAllSearchAttributes() []iwfidl.SearchAttribute {
var res []iwfidl.SearchAttribute
if am.provider.GetBackendType() == service.BackendTypeCadence {
// TODO not sure why cadence doesn't work for this
for _, value := range am.searchAttributes {
res = append(res, value)
}
return res
}

// NOTE: using DeterministicKeys so that the JSON snapshot for continueAsNew is stable for pagination
// TODO: we should use DeterministicKeys for every map iteration in interpreter for safety
// https://github.com/indeedeng/iwf/issues/510
Expand All @@ -170,6 +178,14 @@ func (am *PersistenceManager) GetAllSearchAttributes() []iwfidl.SearchAttribute

func (am *PersistenceManager) GetAllDataObjects() []iwfidl.KeyValue {
var res []iwfidl.KeyValue
if am.provider.GetBackendType() == service.BackendTypeCadence {
// TODO not sure why cadence doesn't work for this
for _, value := range am.dataObjects {
res = append(res, value)
}
return res
}

// NOTE: using DeterministicKeys so that the JSON snapshot for continueAsNew is stable for pagination
// TODO: we should use DeterministicKeys for every map iteration in interpreter for safety
// https://github.com/indeedeng/iwf/issues/510
Expand Down

0 comments on commit 705a879

Please sign in to comment.