Skip to content

Commit de2eca8

Browse files
committed
Adjust scheduler's interval value and puma test
1 parent 5d7c949 commit de2eca8

File tree

4 files changed

+4
-5
lines changed

4 files changed

+4
-5
lines changed

lib/solid_queue/processes/runnable.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def start
1818

1919
def stop
2020
@stopped = true
21-
wake_up if running_async?
21+
wake_up
2222

2323
@thread&.join
2424
end

lib/solid_queue/processes/supervised.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ def register_signal_handlers
2929
%w[ INT TERM ].each do |signal|
3030
trap(signal) do
3131
stop
32-
interrupt
3332
end
3433
end
3534

lib/solid_queue/scheduler.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def metadata
2020
end
2121

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

2525
def run
2626
loop do

test/integration/puma/plugin_test.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class PluginTest < ActiveSupport::TestCase
1919
exec(*cmd)
2020
end
2121
end
22-
wait_for_registered_processes(4, timeout: 3.second)
22+
wait_for_registered_processes 5, timeout: 3.second
2323
end
2424

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

4343
StoreResultJob.perform_later(:puma_plugin)
4444
wait_for_jobs_to_finish_for(2.seconds)

0 commit comments

Comments
 (0)