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

[Mobile Config] Add device_types filter to stream_gateways_info #880

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

kurotych
Copy link
Member

No description provided.

@kurotych kurotych changed the title Gateway info stream filtered [Mobile Config] Add device_types filter to stream_gateways_info Oct 24, 2024
@kurotych kurotych marked this pull request as ready for review October 24, 2024 06:25
tracing::debug!("fetching all gateways' info");
tracing::debug!(
"fetching all gateways' info. Device types: {:?} ",
request.device_types
Copy link
Contributor

Choose a reason for hiding this comment

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

should this debug statement come after the map below? it would debug to a vec of i32s before that conversion, no?

Copy link
Member Author

Choose a reason for hiding this comment

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

Good catch! Fixed

Comment on lines 76 to 85
impl DeviceType {
fn to_sql_argument(&self) -> String {
match self {
DeviceType::Cbrs => "\"cbrs\"".to_string(),
DeviceType::WifiIndoor => "\"wifiIndoor\"".to_string(),
DeviceType::WifiOutdoor => "\"wifiOutdoor\"".to_string(),
DeviceType::WifiDataOnly => "\"wifiDataOnly\"".to_string(),
}
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

should be able to make this more general and just impl std::fmt::Display for this, avoid the escape characters, and it will work just as well

Copy link
Member Author

Choose a reason for hiding this comment

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

I've made it more generic but still forced to use quotas to make it works

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.

2 participants