Skip to content
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

refactor: Use operator-rs Duration #115

Merged
merged 1 commit into from
Nov 13, 2023
Merged
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
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