Skip to content

Commit

Permalink
refactor: Use operator-rs DUration (#115)
Browse files Browse the repository at this point in the history
  • Loading branch information
Techassi authored Nov 13, 2023
1 parent 5ea5d7a commit 2a93b99
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions rust/operator-binary/src/listener_controller.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use crate::utils::node_primary_address;
use std::{collections::BTreeMap, sync::Arc};

use futures::{future::try_join_all, StreamExt};
use snafu::{OptionExt, ResultExt, Snafu};
use stackable_operator::{
Expand All @@ -13,10 +14,12 @@ use stackable_operator::{
runtime::{controller, reflector::ObjectRef, watcher},
},
logging::controller::{report_controller_reconciled, ReconcilerError},
time::Duration,
};
use std::{collections::BTreeMap, sync::Arc, time::Duration};
use strum::IntoStaticStr;

use crate::utils::node_primary_address;

#[cfg(doc)]
use stackable_operator::k8s_openapi::api::core::v1::Pod;

Expand Down Expand Up @@ -316,7 +319,7 @@ pub async fn reconcile(listener: Arc<Listener>, ctx: Arc<Ctx>) -> Result<control
}

pub fn error_policy<T>(_obj: Arc<T>, _error: &Error, _ctx: Arc<Ctx>) -> controller::Action {
controller::Action::requeue(Duration::from_secs(5))
controller::Action::requeue(*Duration::from_secs(5))
}

#[derive(Snafu, Debug)]
Expand Down

0 comments on commit 2a93b99

Please sign in to comment.