From 537d7a9e67607d21c61bda0a9cdd1168164ac76e Mon Sep 17 00:00:00 2001 From: jClugstor Date: Tue, 7 Nov 2023 12:31:01 -0500 Subject: [PATCH] get rid of Seconds --- src/operations.jl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/operations.jl b/src/operations.jl index 9ee82be..5f19f0e 100644 --- a/src/operations.jl +++ b/src/operations.jl @@ -110,7 +110,7 @@ function amr_get(df::DataFrame, sys::ODESystem, ::Val{:data}) end #--------------------------------------------------------------------# IntermediateResults callback -# Publish intermediate results to RabbitMQ with at least `every` seconds in between callbacks +# Publish intermediate results to RabbitMQ with at least `every` iterations in between callbacks mutable struct IntermediateResults last_callback::Int # Track the last iteration the callback was called every::Int # Callback frequency @@ -169,7 +169,7 @@ function Simulate(o::OperationRequest) end function get_callback(o::OperationRequest, ::Type{Simulate}) - DiscreteCallback((args...) -> true, IntermediateResults(o.id,every = Dates.Second(0))) + DiscreteCallback((args...) -> true, IntermediateResults(o.id,every = 10)) end # callback for Simulate requests @@ -194,7 +194,7 @@ end # callback for Calibrate requests function get_callback(o::OperationRequest, ::Type{Calibrate}) - IntermediateResults(o.id,every = Dates.Second(0)) + IntermediateResults(o.id,every = 10) end function Calibrate(o::OperationRequest)