Skip to content

Commit

Permalink
Remove webhooks (#156)
Browse files Browse the repository at this point in the history
  • Loading branch information
npmenard authored Mar 12, 2024
1 parent 8392f84 commit 9cd5a78
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 223 deletions.
1 change: 0 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ test-log = "0.2.11"
thiserror = "1.0.47"
tokio = { version = "1.29.1", default-features = false }
trackable = "1.2.0"
url = "2.4.0"
viam = { version = ">=0.0.17", git = "https://github.com/viamrobotics/viam-rust-sdk.git" }
viam-rust-utils = "0.1.2"
webpki-roots = "0.22.6"
Expand Down
1 change: 0 additions & 1 deletion micro-rdk/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ stun_codec.workspace = true
thiserror.workspace = true
tokio.workspace = true
trackable.workspace = true
url.workspace = true
webpki-roots = { workspace = true, optional = true }

[build-dependencies]
Expand Down
24 changes: 0 additions & 24 deletions micro-rdk/src/esp32/entry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,8 @@ use super::{
exec::Esp32Executor,
tcp::Esp32Stream,
tls::{Esp32Tls, Esp32TlsServerConfig},
webhook::Webhook,
};

use crate::esp32::esp_idf_svc::http::client::{
Configuration as HttpConfiguration, EspHttpConnection,
};
use embedded_svc::http::client::Client as HttpClient;
use futures_lite::Future;

pub async fn serve_web_inner(
Expand Down Expand Up @@ -111,25 +106,6 @@ pub async fn serve_web_inner(
exec.clone(),
));

let robot_cfg = cfg_response.as_ref().config.as_ref().unwrap();

if let Ok(webhook) = Webhook::from_robot_config(robot_cfg) {
if webhook.has_endpoint() {
// only make a client if a webhook url is present
let mut client = HttpClient::wrap(
EspHttpConnection::new(&HttpConfiguration {
crt_bundle_attach: Some(
crate::esp32::esp_idf_svc::sys::esp_crt_bundle_attach,
),
..Default::default()
})
.unwrap(),
);

let _ = webhook.send(&mut client);
}
}

(
Box::new(
ViamServerBuilder::new(
Expand Down
1 change: 0 additions & 1 deletion micro-rdk/src/esp32/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ pub mod single_encoder;
pub mod tcp;
pub mod tls;
pub mod utils;
pub mod webhook;
pub mod conn {
pub mod mdns;
}
195 changes: 0 additions & 195 deletions micro-rdk/src/esp32/webhook.rs

This file was deleted.

0 comments on commit 9cd5a78

Please sign in to comment.