Update dispatch url used in examples to dummy#150
Merged
Marenz merged 1 commit intofrequenz-floss:v0.x.xfrom May 15, 2025
Merged
Update dispatch url used in examples to dummy#150Marenz merged 1 commit intofrequenz-floss:v0.x.xfrom
Marenz merged 1 commit intofrequenz-floss:v0.x.xfrom
Conversation
Signed-off-by: Mathias L. Baumann <mathias.baumann@frequenz.com>
There was a problem hiding this comment.
Pull Request Overview
This PR updates the dispatch URL used in examples to a dummy URL.
- Updated the default dispatch URL in multiple run functions within _dispatcher.py.
- Updated the URL in the main function of _actor_dispatcher.py.
- Updated the URL in the README example.
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/frequenz/dispatch/_dispatcher.py | Updated default URL in several run functions. |
| src/frequenz/dispatch/_actor_dispatcher.py | Updated default URL in the main function. |
| README.md | Updated dispatch URL in example code. |
|
|
||
| async def run(): | ||
| url = os.getenv("DISPATCH_API_URL", "grpc://fz-0004.frequenz.io:50051") | ||
| url = os.getenv("DISPATCH_API_URL", "grpc://dispatch.url.goes.here.example.com") |
There was a problem hiding this comment.
[nitpick] The default dispatch URL assignment appears in multiple run functions; consider centralizing this logic (for example, via a helper or a shared constant) to simplify future updates.
Suggested change
| url = os.getenv("DISPATCH_API_URL", "grpc://dispatch.url.goes.here.example.com") | |
| url = os.getenv("DISPATCH_API_URL", DEFAULT_DISPATCH_URL) |
|
|
||
| async def main(): | ||
| url = os.getenv("DISPATCH_API_URL", "grpc://fz-0004.frequenz.io:50051") | ||
| url = os.getenv("DISPATCH_API_URL", "grpc://dispatch.url.goes.here.example.com") |
There was a problem hiding this comment.
[nitpick] Similar to other changes, the repeated assignment of the default dispatch URL could be consolidated into a common module or constant for better maintainability.
Suggested change
| url = os.getenv("DISPATCH_API_URL", "grpc://dispatch.url.goes.here.example.com") | |
| url = os.getenv("DISPATCH_API_URL", DEFAULT_DISPATCH_URL) |
llucax
approved these changes
May 15, 2025
Merged
via the queue into
frequenz-floss:v0.x.x
with commit May 15, 2025
b906c7e
5 of 6 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.