Skip to content

Commit

Permalink
Remove delaysec (#1553)
Browse files Browse the repository at this point in the history
  • Loading branch information
slinkydeveloper authored May 27, 2024
1 parent 767fc10 commit 3ef3eba
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 9 deletions.
3 changes: 0 additions & 3 deletions crates/ingress-http/src/handler/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ pub(crate) enum HandlerError {
BadHeader(header::HeaderName, #[source] header::ToStrError),
#[error("bad delay query parameter, must be a ISO8601 duration: {0}")]
BadDelayDuration(String),
#[error("bad delaySec query parameter, must be a number: {0:?}")]
BadDelaySecDuration(std::num::ParseIntError),
#[error("bad path, cannot decode key: {0:?}")]
UrlDecodingError(string::FromUtf8Error),
#[error("the invoked service is not public")]
Expand Down Expand Up @@ -100,7 +98,6 @@ impl HandlerError {
| HandlerError::PrivateService
| HandlerError::UrlDecodingError(_)
| HandlerError::BadDelayDuration(_)
| HandlerError::BadDelaySecDuration(_)
| HandlerError::BadAwakeablesPath
| HandlerError::UnsupportedDelay
| HandlerError::BadHeader(_, _)
Expand Down
6 changes: 0 additions & 6 deletions crates/ingress-http/src/handler/service_handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ use tracing::{info, trace, warn, Instrument};

pub(crate) const IDEMPOTENCY_KEY: HeaderName = HeaderName::from_static("idempotency-key");
const DELAY_QUERY_PARAM: &str = "delay";
const DELAYSEC_QUERY_PARAM: &str = "delaysec";

#[derive(Debug, Serialize)]
#[cfg_attr(test, derive(serde::Deserialize))]
Expand Down Expand Up @@ -339,11 +338,6 @@ fn parse_delay(query: Option<&str>) -> Result<Option<Duration>, HandlerError> {
.0,
));
}
if k.eq_ignore_ascii_case(DELAYSEC_QUERY_PARAM) {
return Ok(Some(Duration::from_secs(
v.parse().map_err(HandlerError::BadDelaySecDuration)?,
)));
}
}

Ok(None)
Expand Down

0 comments on commit 3ef3eba

Please sign in to comment.