-
Notifications
You must be signed in to change notification settings - Fork 6
Update dispatch url used in examples to dummy #150
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
Conversation
Signed-off-by: Mathias L. Baumann <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
@@ -55,7 +55,7 @@ async def create_actor(dispatch: DispatchInfo, receiver: Receiver[DispatchInfo]) | |||
return MagicMock(dispatch=dispatch, receiver=receiver) | |||
|
|||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[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.
url = os.getenv("DISPATCH_API_URL", "grpc://dispatch.url.goes.here.example.com") | |
url = os.getenv("DISPATCH_API_URL", DEFAULT_DISPATCH_URL) |
Copilot uses AI. Check for mistakes.
@@ -115,7 +115,7 @@ def _update_dispatch_information(self, dispatch_update: DispatchInfo) -> None: | |||
) | |||
|
|||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[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.
url = os.getenv("DISPATCH_API_URL", "grpc://dispatch.url.goes.here.example.com") | |
url = os.getenv("DISPATCH_API_URL", DEFAULT_DISPATCH_URL) |
Copilot uses AI. Check for mistakes.
b906c7e
No description provided.