From 9dd623af43149c0fac9d9b79c5007113e7dd4aa0 Mon Sep 17 00:00:00 2001 From: Wladymir Brborich Date: Mon, 3 Jan 2022 18:41:08 -0500 Subject: [PATCH] Release 0.0.2 (#9) * Create 0.0.2rc (#8) * Use ordered data structure to keep track of queue processes (#7) * Fix potential sync bugs with processes being joined out of order * A dictionary is unordered, this could cause issues when joining processes since this operation needs to be done in order * Using a tuple is the best option here, since it is immutable and the structure is simple enough * push rolling releases with rc branch, not develop * bump package version to 0.0.2rc * bump package version to 0.0.2 --- .github/workflows/publish_rolling_release.yml | 2 +- setup.py | 2 +- src/queue_automator/main.py | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/publish_rolling_release.yml b/.github/workflows/publish_rolling_release.yml index 998fd91..4884105 100644 --- a/.github/workflows/publish_rolling_release.yml +++ b/.github/workflows/publish_rolling_release.yml @@ -2,7 +2,7 @@ name: Publish Python 🐍 distributions 📦 to TestPyPI on: push: - branches: [ develop ] + branches: [ "rc" ] jobs: deploy: diff --git a/setup.py b/setup.py index 099d165..844fdcc 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setuptools.setup( name="queue-automator", - version="0.0.1", + version="0.0.2", author="Wason1797", author_email="wabrborich@hotmail.com", description="A simple wrapper to build queue multiprocessing pipelines", diff --git a/src/queue_automator/main.py b/src/queue_automator/main.py index 98cca1a..52f6e3b 100644 --- a/src/queue_automator/main.py +++ b/src/queue_automator/main.py @@ -192,11 +192,11 @@ def run(self) -> list: self.__generate_queues(queues, manager, QueueNames.INPUT) - process_per_queue = {input_queue: self.__spawn_processes(input_queue, output_queue) for input_queue, output_queue in queues} + process_per_queue = tuple((input_queue, self.__spawn_processes(input_queue, output_queue)) for input_queue, output_queue in queues) self.__enqueue_input_data() - for queue_name, procesess in process_per_queue.items(): + for queue_name, procesess in process_per_queue: current_queue = self.__queue_table[queue_name] current_queue['queue'].join() self.__signal_queue_exit(current_queue['queue'], current_queue['process_count'])