diff options
author | Simon Glass <sjg@chromium.org> | 2025-04-29 07:22:25 -0600 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2025-05-27 10:07:41 +0100 |
commit | 52aef33f953b5864dc015448783ecd2d9415e52f (patch) | |
tree | fe7addbea78bcf3e6f74c406e08d4548b7938062 /tools/patman/patchwork.py | |
parent | 45f4f6219182927c34d2dc0359f4bf044d3ed432 (diff) |
patman: Provide an option to run in single-threaded mode
Patman normally sends multiple concurrent requests to the patchwork
server, as this is faster. Provide an option to disable this.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/patman/patchwork.py')
-rw-r--r-- | tools/patman/patchwork.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/patman/patchwork.py b/tools/patman/patchwork.py index 2b7734bbfe4..47d7be28fdf 100644 --- a/tools/patman/patchwork.py +++ b/tools/patman/patchwork.py @@ -139,7 +139,7 @@ class Review: class Patchwork: """Class to handle communication with patchwork """ - def __init__(self, url, show_progress=True): + def __init__(self, url, show_progress=True, single_thread=False): """Set up a new patchwork handler Args: @@ -151,7 +151,8 @@ class Patchwork: self.proj_id = None self.link_name = None self._show_progress = show_progress - self.semaphore = asyncio.Semaphore(MAX_CONCURRENT) + self.semaphore = asyncio.Semaphore( + 1 if single_thread else MAX_CONCURRENT) self.request_count = 0 async def _request(self, client, subpath): |