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

pub_sub: go: set publisher sleep to 1 second #891

Merged
merged 1 commit into from
Sep 8, 2023
Merged

pub_sub: go: set publisher sleep to 1 second #891

merged 1 commit into from
Sep 8, 2023

Conversation

paskozdilar
Copy link
Contributor

Description

The current implementation calls time.Sleep(1000) with untyped literal 1000, which is interpreted as 1000 nanoseconds, or 1 millisecond.

This commit changes the sleep duration to proper typed constant time.Second, which corresponds to the sleep time of other language examples.

Issue reference

This issue will close #890.

Checklist

I have completed all the tasks:

  • The quickstart code compiles correctly
  • You've tested new builds of the quickstart if you changed quickstart code
  • You've updated the quickstart's README if necessary
  • If you have changed the steps for a quickstart be sure that you have updated the automated validation accordingly. All of our quickstarts have annotations that allow them to be executed automatically as code. For more information see mechanical-markdown. For user guide with examples see Examples.

The current implementation calls `time.Sleep(1000)` with untyped
literal `1000`, which is interpreted as 1000 nanoseconds, or 1
millisecond.

This commit changes the sleep duration to proper typed constant
`time.Second`, which corresponds to the sleep time of other
language examples.

Signed-off-by: Paško Zdilar <pasko.zdilar@meshmind.io>
Copy link
Contributor

@rabollin rabollin left a comment

Choose a reason for hiding this comment

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

Looks good, specifying the correction duration will be more readable, the sleep duration will be exact one sec.

Copy link
Member

@msfussell msfussell left a comment

Choose a reason for hiding this comment

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

LGTM

@msfussell msfussell merged commit f98a406 into dapr:master Sep 8, 2023
6 of 7 checks passed
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.

pub_sub: go: publisher sleeps for 1 millisecond instead of 1 second
3 participants