Skip to content

Commit abe89df

Browse files
author
Vidas P
committed
Increase scheduler frequency
Apparently in some cases scheduler frequency is not high enough to keep up with message propagation jobs. Lower message propagation requency to once a second and increase scheduler frequency to 10 times a second.
1 parent 822ffc0 commit abe89df

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/active_workflow/agent_scheduler.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class AgentScheduler
2323

2424
def initialize()
2525
@mutex = Mutex.new
26-
@scheduler = Rufus::Scheduler.new(frequency: ENV['SCHEDULER_FREQUENCY'].presence || 0.3)
26+
@scheduler = Rufus::Scheduler.new(frequency: ENV['SCHEDULER_FREQUENCY'].presence || 0.1)
2727
end
2828

2929
def run
@@ -32,7 +32,7 @@ def run
3232
puts "Starting scheduler" unless Rails.env.test?
3333

3434
# Schedule message propagation.
35-
scheduler.every('0.5s', tag: TAG) do
35+
scheduler.every('1s', tag: TAG) do
3636
propagate!
3737
end
3838

0 commit comments

Comments
 (0)