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

Transact durations should always be millisecond #449

Open
qianl15 opened this issue May 13, 2024 · 2 comments
Open

Transact durations should always be millisecond #449

qianl15 opened this issue May 13, 2024 · 2 comments

Comments

@qianl15
Copy link
Member

qianl15 commented May 13, 2024

For now, workflow context sleep takes in duratioinSec. But JS/TS developers always expect millisecond sleep/timeout. We should match the common practice in V2.

We should also consider adding support for strings like "2 days", "30s" by using the ms package.

@devhawk devhawk transferred this issue from another repository May 21, 2024
@devhawk devhawk transferred this issue from another repository May 21, 2024
@devhawk devhawk changed the title [V2 feature] Transact durations should always be millisecond + support other strings Transact durations should always be millisecond + support other strings May 21, 2024
@devhawk
Copy link
Collaborator

devhawk commented May 21, 2024

@qianl15 we could add ms package support to the existing sleep function without a breaking change. sleep and sleepms both take a number parameter. If we changed that to number | string we could use the ms if the user passes in a string. Should we separate the non breaking functionality out into a separate issue?

@qianl15
Copy link
Member Author

qianl15 commented May 21, 2024

Yeah that's a good idea. We can separately file an issue (non-breaking) saying we want sleep to support strings.

@devhawk devhawk changed the title Transact durations should always be millisecond + support other strings Transact durations should always be millisecond May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants