-
Notifications
You must be signed in to change notification settings - Fork 21
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
base: main
Are you sure you want to change the base?
Conversation
a419d30
to
ef9d21a
Compare
mobile_config/src/gateway_service.rs
Outdated
tracing::debug!("fetching all gateways' info"); | ||
tracing::debug!( | ||
"fetching all gateways' info. Device types: {:?} ", | ||
request.device_types |
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.
should this debug statement come after the map below? it would debug to a vec of i32s before that conversion, no?
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.
Good catch! Fixed
mobile_config/src/gateway_info.rs
Outdated
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(), | ||
} | ||
} | ||
} |
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.
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
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.
I've made it more generic but still forced to use quotas to make it works
No description provided.