mirror of
https://github.com/hatchet-dev/hatchet.git
synced 2025-12-30 13:19:44 -06:00
fix: payload fallback for child runs (#2421)
This commit is contained in:
@@ -1521,13 +1521,18 @@ func (r *TriggerRepositoryImpl) registerChildWorkflows(
|
||||
rootExternalIdsToLookup := make([]pgtype.UUID, 0, len(matchingEvents))
|
||||
|
||||
for _, event := range matchingEvents {
|
||||
payload := payloads[RetrievePayloadOpts{
|
||||
payload, ok := payloads[RetrievePayloadOpts{
|
||||
Id: event.ID,
|
||||
InsertedAt: event.InsertedAt,
|
||||
Type: sqlcv1.V1PayloadTypeTASKEVENTDATA,
|
||||
TenantId: sqlchelpers.UUIDFromStr(tenantId),
|
||||
}]
|
||||
|
||||
if !ok {
|
||||
r.l.Error().Msgf("registerChildWorkflows: event with inserted at %s and id %d has empty payload, falling back to input", event.InsertedAt.Time, event.ID)
|
||||
payload = event.Data
|
||||
}
|
||||
|
||||
c, err := newChildWorkflowSignalCreatedDataFromBytes(payload)
|
||||
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user