MCPcopy Create free account
hub / github.com/dfinity/orbit / validate_execution_plan

Function validate_execution_plan

core/station/impl/src/models/request.rs:206–221  ·  view source on GitHub ↗
(
    execution_plan: &RequestExecutionPlan,
)

Source from the content-addressed store, hash-verified

204}
205
206fn validate_execution_plan(
207 execution_plan: &RequestExecutionPlan,
208) -> ModelValidatorResult<RequestError> {
209 match execution_plan {
210 RequestExecutionPlan::Scheduled { execution_time } => {
211 if *execution_time <= next_time() {
212 return Err(RequestError::ValidationError {
213 info: "The execution time must be in the future".to_owned(),
214 });
215 }
216 }
217 RequestExecutionPlan::Immediate => (),
218 }
219
220 Ok(())
221}
222
223fn validate_deduplication_key(
224 deduplication_key: &Option<String>,

Callers 3

validateMethod · 0.85

Calls 1

next_timeFunction · 0.50