Skip to content

Commit

Permalink
get rid of Seconds
Browse files Browse the repository at this point in the history
  • Loading branch information
jClugstor committed Nov 7, 2023
1 parent 3a0d115 commit 537d7a9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/operations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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)
Expand Down

0 comments on commit 537d7a9

Please sign in to comment.