Skip to content

Commit

Permalink
updated error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
adranwit committed Aug 16, 2024
1 parent d9e060f commit 94e34b1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions service/operator/async.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ func (s *Service) updateJobStatusDone(ctx context.Context, aComponent *repositor
}

var queryParameter = state.NewParameter("Query", state.NewQueryLocation(""), state.WithParameterSchema(state.NewSchema(reflect.TypeOf(""))))
var textLimit = 63 * 1024

func (s *Service) buildJob(ctx context.Context, aSession *session.Session, aState *structology.State, aComponent *repository.Component, matchKey string, options *session.Options) (*async.Job, error) {
asyncModule := aComponent.Async
Expand All @@ -93,6 +94,9 @@ func (s *Service) buildJob(ctx context.Context, aSession *session.Session, aStat
if err != nil {
return nil, err
}
if len(encodedState) > textLimit {
encodedState = encodedState[:textLimit]
}
UUID, err := uuid.NewUUID()
if err != nil {
return nil, err
Expand Down

0 comments on commit 94e34b1

Please sign in to comment.