-
Notifications
You must be signed in to change notification settings - Fork 1
Add ActiveMQ connection in continuous mode and fix monitor_url/env handling in fastmon client #1
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
Add ActiveMQ connection in continuous mode - swf-fastmon-client: - Change the default value of monitor_url to None so that environmental variable SWF_MONITOR_URL is properly used - Define missing self.logger
michmx
left a comment
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.
Works as it is, just adding a few comments in the implementation.
src/swf_fastmon_client/main.py
Outdated
| @app.command() | ||
| def start( | ||
| monitor_url: str = typer.Option("http://localhost:8002", "--monitor-url", "-m", help="Monitor base URL"), | ||
| monitor_url: Optional[str] = typer.Option(None, "--monitor-url", "-m", help="Monitor base URL"), |
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.
Thanks for the fix! It would be good to add to the help message "Overwrites SWF_MONITOR_URL".
|
|
||
|
|
||
| # Connect to ActiveMQ | ||
| self.conn.connect( |
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.
Ah, now I get it! This part is implemented in the run() of the base agent, that is why it is missing here. Thanks for the catch!
It would be cleaner to abstract the connection with the message queue in a method of the base agent, and use it in both run() and here. We can discuss it with @wenaus.
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.
Will address it in a upcoming PR, following the discussion with @buddhasystem
|
Adding a few |
This PR adds ActiveMQ connection logic for continuous mode in swf-fastmon-agent,
and fixes two issues in swf-fastmon-client.
Details
monitor_urlso that the environment variable is properly used.self.loggerdefinition to suppress attribute errors.