revert worker to subprocess model, self-spawning via --worker flag
ProcessPoolExecutor relied on private API, lost os.setpriority and auto-restart. Revert to the subprocess worker but spawn the current executable with --worker instead of a separate eris-worker console script, keeping a single entry point for shiv/pyinstaller. Bump .python-version to 3.14.
This commit is contained in:
parent
2b13609966
commit
feb0d0a68c
4 changed files with 61 additions and 25 deletions
|
|
@ -2,6 +2,7 @@
|
|||
import asyncio
|
||||
import os
|
||||
import shutil
|
||||
import sys
|
||||
import tempfile
|
||||
import unittest
|
||||
|
||||
|
|
@ -28,6 +29,8 @@ class WorkerTestCase(unittest.TestCase):
|
|||
loop = asyncio.new_event_loop()
|
||||
compression = "none"
|
||||
self.worker_ = worker.Worker(compression)
|
||||
command = [sys.executable, "-m", "eris.worker", "--worker"]
|
||||
loop.run_until_complete(self.worker_.create_process(command=command))
|
||||
future = self.worker_.run_tool("foo", tools.metadata)
|
||||
status = loop.run_until_complete(future)
|
||||
self.assertEqual(status, tools.Status.ok)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue