Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
davepacheco committed Feb 23, 2024
1 parent ef298f5 commit 70dfed3
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions nexus/src/app/background/blueprint_execution.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ pub struct BlueprintExecutor {
rx_blueprint: watch::Receiver<Option<Arc<(BlueprintTarget, Blueprint)>>>,
nexus_label: String,
tx: watch::Sender<usize>,
count: usize,
}

impl BlueprintExecutor {
Expand All @@ -33,7 +32,7 @@ impl BlueprintExecutor {
nexus_label: String,
) -> BlueprintExecutor {
let (tx, _) = watch::channel(0);
BlueprintExecutor { datastore, rx_blueprint, nexus_label, tx, count: 0 }
BlueprintExecutor { datastore, rx_blueprint, nexus_label, tx }
}

pub fn watcher(&self) -> watch::Receiver<usize> {
Expand Down Expand Up @@ -79,8 +78,7 @@ impl BackgroundTask for BlueprintExecutor {
.await;

// Trigger anybody waiting for this to finish.
self.count = self.count + 1;
self.tx.send(self.count);
self.tx.send_modify(|count| *count = *count + 1);

// Return the result as a `serde_json::Value`
match result {
Expand Down

0 comments on commit 70dfed3

Please sign in to comment.