Skip to content

Commit a35f18b

Browse files
committed
add options to PurgeWorkflow
Signed-off-by: Fabian Martinez <[email protected]>
1 parent 52318d3 commit a35f18b

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

Diff for: go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ require (
77
github.com/go-chi/chi/v5 v5.1.0
88
github.com/golang/mock v1.6.0
99
github.com/google/uuid v1.6.0
10-
github.com/microsoft/durabletask-go v0.5.0
10+
github.com/microsoft/durabletask-go v0.5.1-0.20241014200046-fac9dd959f4d
1111
github.com/stretchr/testify v1.9.0
1212
google.golang.org/grpc v1.65.0
1313
google.golang.org/protobuf v1.34.2

Diff for: go.sum

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
2828
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
2929
github.com/marusama/semaphore/v2 v2.5.0 h1:o/1QJD9DBYOWRnDhPwDVAXQn6mQYD0gZaS1Tpx6DJGM=
3030
github.com/marusama/semaphore/v2 v2.5.0/go.mod h1:z9nMiNUekt/LTpTUQdpp+4sJeYqUGpwMHfW0Z8V8fnQ=
31-
github.com/microsoft/durabletask-go v0.5.0 h1:4DWBgg05wnkV/VwakaiPqZ4cARvATP74ZQJFcXVMC18=
32-
github.com/microsoft/durabletask-go v0.5.0/go.mod h1:goe2gmMgLptCijMDQ7JsekaR86KjPUG64V9JDXvKBhE=
31+
github.com/microsoft/durabletask-go v0.5.1-0.20241014200046-fac9dd959f4d h1:Phnx8/wPd9BM6RPIjlqNl8kAaFjtU+Sdw9CzmZd8Wsw=
32+
github.com/microsoft/durabletask-go v0.5.1-0.20241014200046-fac9dd959f4d/go.mod h1:goe2gmMgLptCijMDQ7JsekaR86KjPUG64V9JDXvKBhE=
3333
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U=
3434
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
3535
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=

Diff for: workflow/client.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -216,9 +216,9 @@ func (c *Client) ResumeWorkflow(ctx context.Context, id, reason string) error {
216216
// PurgeWorkflow will purge a given workflow and return an error output.
217217
// NOTE: The workflow must be in a terminated or completed state.
218218
// TODO missing upstream support for api.PurgeOptions
219-
func (c *Client) PurgeWorkflow(ctx context.Context, id string) error {
219+
func (c *Client) PurgeWorkflow(ctx context.Context, id string, opts ...api.PurgeOptions) error {
220220
if id == "" {
221221
return errors.New("no workflow id specified")
222222
}
223-
return c.taskHubClient.PurgeOrchestrationState(ctx, api.InstanceID(id))
223+
return c.taskHubClient.PurgeOrchestrationState(ctx, api.InstanceID(id), opts...)
224224
}

0 commit comments

Comments
 (0)