Skip to content

Commit

Permalink
Adjust scheduler's interval value and puma test
Browse files Browse the repository at this point in the history
  • Loading branch information
rosa committed Sep 9, 2024
1 parent 5d7c949 commit de2eca8
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/solid_queue/processes/runnable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def start

def stop
@stopped = true
wake_up if running_async?
wake_up

@thread&.join
end
Expand Down
1 change: 0 additions & 1 deletion lib/solid_queue/processes/supervised.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ def register_signal_handlers
%w[ INT TERM ].each do |signal|
trap(signal) do
stop
interrupt
end
end

Expand Down
2 changes: 1 addition & 1 deletion lib/solid_queue/scheduler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def metadata
end

private
SLEEP_INTERVAL = 300 # Right now it doesn't matter, can be set to 1 in the future for dynamic tasks
SLEEP_INTERVAL = 60 # Right now it doesn't matter, can be set to 1 in the future for dynamic tasks

def run
loop do
Expand Down
4 changes: 2 additions & 2 deletions test/integration/puma/plugin_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class PluginTest < ActiveSupport::TestCase
exec(*cmd)
end
end
wait_for_registered_processes(4, timeout: 3.second)
wait_for_registered_processes 5, timeout: 3.second
end

teardown do
Expand All @@ -38,7 +38,7 @@ class PluginTest < ActiveSupport::TestCase
signal_process(@pid, :SIGUSR2)
# Ensure the restart finishes before we try to continue with the test
wait_for_registered_processes(0, timeout: 3.second)
wait_for_registered_processes(4, timeout: 3.second)
wait_for_registered_processes(5, timeout: 3.second)

StoreResultJob.perform_later(:puma_plugin)
wait_for_jobs_to_finish_for(2.seconds)
Expand Down

0 comments on commit de2eca8

Please sign in to comment.