queue-local 0.0.61__tar.gz → 0.0.62__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {queue_local-0.0.61 → queue_local-0.0.62}/PKG-INFO +1 -1
- {queue_local-0.0.61 → queue_local-0.0.62}/pyproject.toml +1 -1
- {queue_local-0.0.61 → queue_local-0.0.62}/queue_local/src/database_queue.py +6 -7
- {queue_local-0.0.61 → queue_local-0.0.62}/queue_local.egg-info/PKG-INFO +1 -1
- {queue_local-0.0.61 → queue_local-0.0.62}/setup.py +1 -1
- {queue_local-0.0.61 → queue_local-0.0.62}/README.md +0 -0
- {queue_local-0.0.61 → queue_local-0.0.62}/queue_local/src/__init__.py +0 -0
- {queue_local-0.0.61 → queue_local-0.0.62}/queue_local/src/our_queue.py +0 -0
- {queue_local-0.0.61 → queue_local-0.0.62}/queue_local.egg-info/SOURCES.txt +0 -0
- {queue_local-0.0.61 → queue_local-0.0.62}/queue_local.egg-info/dependency_links.txt +0 -0
- {queue_local-0.0.61 → queue_local-0.0.62}/queue_local.egg-info/requires.txt +0 -0
- {queue_local-0.0.61 → queue_local-0.0.62}/queue_local.egg-info/top_level.txt +0 -0
- {queue_local-0.0.61 → queue_local-0.0.62}/setup.cfg +0 -0
|
@@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta"
|
|
|
6
6
|
|
|
7
7
|
[tool.poetry]
|
|
8
8
|
name = "queue-local"
|
|
9
|
-
version = "0.0.
|
|
9
|
+
version = "0.0.1" # https://pypi.org/project/queue-local
|
|
10
10
|
description = "queue-local Python Package"
|
|
11
11
|
readme = "README.md"
|
|
12
12
|
authors = [
|
|
@@ -65,8 +65,8 @@ class DatabaseQueue(OurQueue, GenericCRUD, metaclass=MetaLogger, object=queue_lo
|
|
|
65
65
|
is_test_data=is_test_data)
|
|
66
66
|
self.user_context = UserContext()
|
|
67
67
|
|
|
68
|
-
def push(self,
|
|
69
|
-
queue_dict=queue_dict or
|
|
68
|
+
def push(self, queue_data_dict: dict = None, queue_dict: dict = None) -> int:
|
|
69
|
+
queue_dict=queue_dict or queue_data_dict
|
|
70
70
|
"""Pushes a new entry to the queue and returns the new queue id.
|
|
71
71
|
queue_dict consists of columns and values to insert into the queue table."""
|
|
72
72
|
created_user_id = UserContext().get_effective_user_id()
|
|
@@ -88,13 +88,13 @@ class DatabaseQueue(OurQueue, GenericCRUD, metaclass=MetaLogger, object=queue_lo
|
|
|
88
88
|
# TODO Can we do this everywhere? [I will make it auto in the meta logger]
|
|
89
89
|
|
|
90
90
|
|
|
91
|
-
def push_back(self, queue_item: dict = None,
|
|
91
|
+
def push_back(self, queue_item: dict = None, queue_dict: dict = None) -> None:
|
|
92
92
|
"""Push a taken queue item back to the queue."""
|
|
93
|
-
queue_dict = queue_item or
|
|
93
|
+
queue_dict = queue_item or queue_dict
|
|
94
94
|
queue_dict = {"queue_status_id": QueueStatusEnum.NEW.value, "process_id": None}
|
|
95
|
-
self.update_by_column_and_value(column_value=queue_item[self.queue_item_id_column_name],
|
|
95
|
+
self.update_by_column_and_value(column_value=queue_item[self.queue_item_id_column_name], data_dict=queue_dict)
|
|
96
96
|
|
|
97
|
-
def get(self, *, action_ids: tuple = (), custom_condition: str = "",data_dict: dict = None, queue_dict: dict = None) -> dict:
|
|
97
|
+
def get(self, *, action_ids: tuple = (), custom_condition: str = "", data_dict: dict = None, queue_dict: dict = None) -> dict:
|
|
98
98
|
"""
|
|
99
99
|
Returns the first item from the queue (possibly considering specific actions) and marks it as taken.
|
|
100
100
|
|
|
@@ -104,7 +104,6 @@ class DatabaseQueue(OurQueue, GenericCRUD, metaclass=MetaLogger, object=queue_lo
|
|
|
104
104
|
"""
|
|
105
105
|
queue_dict=data_dict or queue_dict
|
|
106
106
|
action_ids = self._fix_action_ids(action_ids)
|
|
107
|
-
|
|
108
107
|
queue_dict = {"process_id": os.getpid()}
|
|
109
108
|
update_where = f"process_id IS NULL " \
|
|
110
109
|
f"AND (queue_status_id IS NULL OR queue_status_id = {QueueStatusEnum.NEW.value}) " \
|
|
@@ -5,7 +5,7 @@ package_dir = PACKAGE_NAME.replace("-", "_")
|
|
|
5
5
|
|
|
6
6
|
setuptools.setup(
|
|
7
7
|
name=PACKAGE_NAME, # https://pypi.org/project/queue-local
|
|
8
|
-
version='0.0.
|
|
8
|
+
version='0.0.62',
|
|
9
9
|
author="Circles",
|
|
10
10
|
author_email="info@circles.life",
|
|
11
11
|
url=f"https://github.com/circles-zone/{PACKAGE_NAME}-python-package",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|