Skip to content

Commit ce5aa68

Browse files
authored
refactor: s/retriable/retryable/ (#484)
1 parent f1fa42a commit ce5aa68

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

src/execution/live_updater.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ async fn update_source(
125125
futs.push(
126126
async move {
127127
let mut change_stream = change_stream;
128-
let retry_options = retriable::RetryOptions {
128+
let retry_options = retryable::RetryOptions {
129129
max_retries: None,
130130
initial_backoff: std::time::Duration::from_secs(5),
131131
max_backoff: std::time::Duration::from_secs(60),
@@ -134,14 +134,14 @@ async fn update_source(
134134
// Workaround as AsyncFnMut isn't mature yet.
135135
// Should be changed to use AsyncFnMut once it is.
136136
let change_stream = tokio::sync::Mutex::new(&mut change_stream);
137-
let change_msg = retriable::run(
137+
let change_msg = retryable::run(
138138
|| async {
139139
let mut change_stream = change_stream.lock().await;
140140
change_stream
141141
.next()
142142
.await
143143
.transpose()
144-
.map_err(retriable::Error::always_retryable)
144+
.map_err(retryable::Error::always_retryable)
145145
},
146146
&retry_options,
147147
)

src/ops/storages/neo4j.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ impl GraphElement {
103103
}
104104
}
105105

106-
impl retriable::IsRetryable for neo4rs::Error {
106+
impl retryable::IsRetryable for neo4rs::Error {
107107
fn is_retryable(&self) -> bool {
108108
match self {
109109
neo4rs::Error::ConnectionError => true,
@@ -1289,11 +1289,11 @@ impl StorageFactoryBase for Factory {
12891289
.or_insert_with(Vec::new)
12901290
.push(mut_with_ctx);
12911291
}
1292-
let retry_options = retriable::RetryOptions::default();
1292+
let retry_options = retryable::RetryOptions::default();
12931293
for muts in muts_by_graph.values_mut() {
12941294
muts.sort_by_key(|m| m.export_context.create_order);
12951295
let graph = &muts[0].export_context.graph;
1296-
retriable::run(
1296+
retryable::run(
12971297
async || {
12981298
let mut queries = vec![];
12991299
for mut_with_ctx in muts.iter() {
@@ -1311,7 +1311,7 @@ impl StorageFactoryBase for Factory {
13111311
let mut txn = graph.start_txn().await?;
13121312
txn.run_queries(queries).await?;
13131313
txn.commit().await?;
1314-
retriable::Ok(())
1314+
retryable::Ok(())
13151315
},
13161316
&retry_options,
13171317
)

src/prelude.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ pub(crate) use crate::lib_context::{get_lib_context, get_runtime, FlowContext, L
2525
pub(crate) use crate::ops::interface;
2626
pub(crate) use crate::service::error::ApiError;
2727
pub(crate) use crate::setup::AuthRegistry;
28-
pub(crate) use crate::utils::retriable;
28+
pub(crate) use crate::utils::retryable;
2929

3030
pub(crate) use crate::{api_bail, api_error};
3131

src/utils/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
pub mod db;
22
pub mod fingerprint;
33
pub mod immutable;
4-
pub mod retriable;
4+
pub mod retryable;
55
pub mod yaml_ser;
File renamed without changes.

0 commit comments

Comments
 (0)