Skip to content

Commit a123067

Browse files
shirzady1934maxdml
authored andcommitted
remove isGetResult
1 parent 6d94f43 commit a123067

File tree

2 files changed

+2
-10
lines changed

2 files changed

+2
-10
lines changed

dbos/system_database.go

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1293,7 +1293,6 @@ type recordOperationResultDBInput struct {
12931293
tx pgx.Tx
12941294
startedAt time.Time
12951295
completedAt time.Time
1296-
isGetResult bool
12971296
}
12981297

12991298
func (s *sysDB) recordOperationResult(ctx context.Context, input recordOperationResultDBInput) error {
@@ -1318,13 +1317,8 @@ func (s *sysDB) recordOperationResult(ctx context.Context, input recordOperation
13181317
args = append(args, input.childWorkflowID)
13191318
}
13201319

1321-
conflictClause := ""
1322-
if input.isGetResult {
1323-
conflictClause = "ON CONFLICT DO NOTHING"
1324-
}
1325-
1326-
query := fmt.Sprintf(`INSERT INTO %s.operation_outputs (%s) VALUES (%s) %s`,
1327-
pgx.Identifier{s.schema}.Sanitize(), strings.Join(columns, ", "), strings.Join(placeholders, ", "), conflictClause)
1320+
query := fmt.Sprintf(`INSERT INTO %s.operation_outputs (%s) VALUES (%s)`,
1321+
pgx.Identifier{s.schema}.Sanitize(), strings.Join(columns, ", "), strings.Join(placeholders, ", "))
13281322

13291323
var err error
13301324
if input.tx != nil {

dbos/workflow.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,6 @@ func (h *workflowHandle[R]) processOutcome(outcome workflowOutcome[R], startTime
252252
err: outcome.err,
253253
startedAt: startTime,
254254
completedAt: completedTime,
255-
isGetResult: true,
256255
stepName: "DBOS.getResult",
257256
}
258257
recordResultErr := retry(h.dbosContext, func() error {
@@ -318,7 +317,6 @@ func (h *workflowPollingHandle[R]) GetResult(opts ...GetResultOption) (R, error)
318317
err: err,
319318
startedAt: startTime,
320319
completedAt: completedTime,
321-
isGetResult: true,
322320
stepName: "DBOS.getResult",
323321
}
324322
recordResultErr := retry(h.dbosContext, func() error {

0 commit comments

Comments
 (0)