Skip to content
This repository was archived by the owner on Jan 27, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion crates/dev-utils/examples/submit_work.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ async fn main() -> Result<()> {
let call = contracts
.compute_pool
.build_work_submission_call(pool_id, node, work_key, U256::from(179949060096000.0))
.await
.map_err(|e| eyre::eyre!("Failed to build work submission call: {}", e))?;

let tx = call
Expand Down
2 changes: 1 addition & 1 deletion crates/discovery/src/chainsync/sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ impl ChainSync {
}
}

pub async fn run(self) -> Result<(), Error> {
pub fn run(self) -> Result<(), Error> {
let ChainSync {
node_store,
cancel_token,
Expand Down
2 changes: 1 addition & 1 deletion crates/discovery/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ async fn main() -> Result<()> {
contracts.clone(),
last_chain_sync.clone(),
);
chain_sync.run().await?;
chain_sync.run()?;

// Start location enrichment service if enabled
if let Some(location_url) = args.location_service_url.clone() {
Expand Down
4 changes: 1 addition & 3 deletions crates/orchestrator/src/metrics/webhook_sender.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,7 @@ impl MetricsWebhookSender {
if Self::metrics_changed(&metrics, &self.last_sent_metrics) {
info!("Sending {} metrics via webhook", metrics.len());
for plugin in &self.webhook_plugins {
let _ = plugin
.send_metrics_updated(self.pool_id, metrics.clone())
.await;
let _ = plugin.send_metrics_updated(self.pool_id, metrics.clone());
}
// Update last sent metrics
self.last_sent_metrics = metrics.clone();
Expand Down
89 changes: 30 additions & 59 deletions crates/orchestrator/src/plugins/node_groups/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -622,20 +622,13 @@ impl NodeGroupsPlugin {
for group in webhook_groups {
if let Some(plugins) = &self.webhook_plugins {
for plugin in plugins.iter() {
let group_clone = group.clone();
let plugin_clone = plugin.clone();
tokio::spawn(async move {
if let Err(e) = plugin_clone
.send_group_created(
group_clone.id.to_string(),
group_clone.configuration_name.to_string(),
group_clone.nodes.iter().cloned().collect(),
)
.await
{
error!("Failed to send group created webhook: {e}");
}
});
if let Err(e) = plugin.send_group_created(
group.id.clone(),
group.configuration_name.clone(),
group.nodes.iter().cloned().collect(),
) {
error!("Failed to send group created webhook: {}", e);
}
}
}
}
Expand Down Expand Up @@ -981,51 +974,36 @@ impl NodeGroupsPlugin {
}

// Send webhook notifications
self.send_merge_webhooks(groups_to_merge, &merged_group)
.await;
self.send_merge_webhooks(groups_to_merge, &merged_group);

Ok(Some((merged_group, group_ids_to_dissolve)))
}

/// Send webhook notifications for group merging
async fn send_merge_webhooks(&self, dissolved_groups: &[NodeGroup], merged_group: &NodeGroup) {
fn send_merge_webhooks(&self, dissolved_groups: &[NodeGroup], merged_group: &NodeGroup) {
if let Some(plugins) = &self.webhook_plugins {
// Send dissolved notifications
for group in dissolved_groups {
for plugin in plugins.iter() {
let plugin_clone = plugin.clone();
let group_clone = group.clone();
tokio::spawn(async move {
if let Err(e) = plugin_clone
.send_group_destroyed(
group_clone.id,
group_clone.configuration_name,
group_clone.nodes.iter().cloned().collect(),
)
.await
{
error!("Failed to send group dissolved webhook: {e}");
}
});
if let Err(e) = plugin.send_group_destroyed(
group.id.clone(),
group.configuration_name.clone(),
group.nodes.iter().cloned().collect(),
) {
error!("Failed to send group dissolved webhook: {}", e);
}
}
}

// Send created notification
for plugin in plugins.iter() {
let plugin_clone = plugin.clone();
let group_clone = merged_group.clone();
tokio::spawn(async move {
if let Err(e) = plugin_clone
.send_group_created(
group_clone.id,
group_clone.configuration_name,
group_clone.nodes.iter().cloned().collect(),
)
.await
{
error!("Failed to send group created webhook: {e}");
}
});
if let Err(e) = plugin.send_group_created(
merged_group.id.clone(),
merged_group.configuration_name.clone(),
merged_group.nodes.iter().cloned().collect(),
) {
error!("Failed to send group created webhook: {}", e);
}
}
}
}
Expand Down Expand Up @@ -1098,20 +1076,13 @@ impl NodeGroupsPlugin {
);
if let Some(plugins) = &self.webhook_plugins {
for plugin in plugins.iter() {
let plugin_clone = plugin.clone();
let group_clone = group.clone();
tokio::spawn(async move {
if let Err(e) = plugin_clone
.send_group_destroyed(
group_clone.id.to_string(),
group_clone.configuration_name.to_string(),
group_clone.nodes.iter().cloned().collect(),
)
.await
{
error!("Failed to send group dissolved webhook: {e}");
}
});
if let Err(e) = plugin.send_group_destroyed(
group.id.clone(),
group.configuration_name.clone(),
group.nodes.iter().cloned().collect(),
) {
error!("Failed to send group dissolved webhook: {}", e);
}
}
}
} else {
Expand Down
Loading