Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add UpdatableTimer example #304

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

taonic
Copy link
Contributor

@taonic taonic commented Jul 5, 2024

Demonstrates how to use signals to update timers, a pattern that resembles https://github.com/temporalio/samples-go/blob/main/updatabletimer/workflow.go

@taonic taonic force-pushed the taonic/add_updatable_time_example branch from 803ce08 to 2fa19a4 Compare July 5, 2024 08:00
if timer.finished?
workflow.logger.info("Timer fired")
break
end

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could add

else
    timer.cancel
end

@taonic taonic force-pushed the taonic/add_updatable_time_example branch from 2fa19a4 to eb1024b Compare July 8, 2024 08:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants