Skip to content

feat(sdk/go): Include a shutdown signaller for closing a client#3331

Draft
gregfurman wants to merge 1 commit intohatchet-dev:mainfrom
gregfurman:add/util/shutsig
Draft

feat(sdk/go): Include a shutdown signaller for closing a client#3331
gregfurman wants to merge 1 commit intohatchet-dev:mainfrom
gregfurman:add/util/shutsig

Conversation

@gregfurman
Copy link
Collaborator

Description

Fixes #3283

This PR introduces a shutdown utlity that will allow a Client to close all pending requests via context cancellation.

Since there is no way to cancel a hanging NewWorkflow request without introducing breaking changes, this approach allows us to forcefully stop all requests with client.Close()

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

What's Changed

  • Added a new shutdown.Signaller utility in internal/shutdown/shutdown.go that allows us to derive multiple contexts and cancel them when a shutdown call is made.
  • Included a Close() error method on the Client interface, which should ungracefully cancel all currently running requests.

@vercel
Copy link

vercel bot commented Mar 19, 2026

@gregfurman is attempting to deploy a commit to the Hatchet Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Calls to client.NewWorker cannot be cancelled, causing application to hang if server is unavailable

1 participant