Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4

- uses: ruby/setup-ruby@44511735964dcb71245e7e55f72539531f7bc0eb # v1
- uses: ruby/setup-ruby@8aeb6ff8030dd539317f8e1769a044873b56ea71 # v1
env:
RSPEC_CORE: ${{ matrix.rspec-core-version }}
with:
Expand Down
5 changes: 4 additions & 1 deletion lib/rspecq/worker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,10 @@ def initialize(build_id:, worker_id:, redis_opts:, shutdown_pipe: nil)
end

def shutdown?
@shutdown_pipe&.ready?
return false if @shutdown_pipe.nil?

# returns :wait_readable if the supervisor has not signaled shutdown (closed the writer)
@shutdown_pipe.read_nonblock(1, exception: false).nil?
end

def work
Expand Down