Skip to content

Commit

Permalink
scheduler/analysis: Don't close queues
Browse files Browse the repository at this point in the history
Before this commit the following test had the Worker processes crashing.

```python
import pytest

@pytest.mark.SchedulerTestConfig(start_processes=True)
def test_bar(analysis_scheduler):
    assert False
```
  • Loading branch information
maringuu committed Jul 3, 2023
1 parent a6b605c commit 402e19c
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/scheduler/analysis/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ def __init__(
self._in_queue: mp.Queue = mp.Queue()
#: Workers put the ``Task.scheduler_state`` and the finished analysis in the out_queue
self.out_queue: mp.Queue = mp.Queue()
self.out_queue.close()

self.stats = mp.Array(ctypes.c_float, ANALYSIS_STATS_LIMIT)
self.stats_count = mp.Value('i', 0)
Expand Down Expand Up @@ -162,7 +161,6 @@ def __init__(
self._worker_config = worker_config

self._in_queue = in_queue
self._in_queue.close()
self._out_queue = out_queue

self._stats = stats
Expand Down

0 comments on commit 402e19c

Please sign in to comment.