queue-local 0.0.33__tar.gz → 0.0.35__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.33 → queue-local-0.0.35}/PKG-INFO +1 -1
- {queue-local-0.0.33 → queue-local-0.0.35}/queue_local/src/database_queue.py +4 -3
- {queue-local-0.0.33 → queue-local-0.0.35}/queue_local.egg-info/PKG-INFO +1 -1
- {queue-local-0.0.33 → queue-local-0.0.35}/setup.py +1 -1
- {queue-local-0.0.33 → queue-local-0.0.35}/README.md +0 -0
- {queue-local-0.0.33 → queue-local-0.0.35}/pyproject.toml +0 -0
- {queue-local-0.0.33 → queue-local-0.0.35}/queue_local/src/__init__.py +0 -0
- {queue-local-0.0.33 → queue-local-0.0.35}/queue_local/src/our_queue.py +0 -0
- {queue-local-0.0.33 → queue-local-0.0.35}/queue_local.egg-info/SOURCES.txt +0 -0
- {queue-local-0.0.33 → queue-local-0.0.35}/queue_local.egg-info/dependency_links.txt +0 -0
- {queue-local-0.0.33 → queue-local-0.0.35}/queue_local.egg-info/requires.txt +0 -0
- {queue-local-0.0.33 → queue-local-0.0.35}/queue_local.egg-info/top_level.txt +0 -0
- {queue-local-0.0.33 → queue-local-0.0.35}/setup.cfg +0 -0
|
@@ -59,7 +59,7 @@ class DatabaseQueue(OurQueue, GenericCRUD):
|
|
|
59
59
|
"schema_name": schema_name, "table_name": table_name, "view_name": view_name, "id_column_name": id_column_name})
|
|
60
60
|
self.user = UserContext()
|
|
61
61
|
|
|
62
|
-
def push(self, data_json: dict) ->
|
|
62
|
+
def push(self, data_json: dict) -> int:
|
|
63
63
|
"""Pushes a new entry to the queue.
|
|
64
64
|
data_json consists of columns and values to insert into the queue table."""
|
|
65
65
|
created_user_id = UserContext().get_effective_user_id()
|
|
@@ -71,11 +71,12 @@ class DatabaseQueue(OurQueue, GenericCRUD):
|
|
|
71
71
|
data_json["queue_status_id"] = StatusEnum.NEW.value
|
|
72
72
|
data_json["created_user_id"] = created_user_id
|
|
73
73
|
|
|
74
|
-
self.insert(data_json=data_json)
|
|
74
|
+
queue_id = self.insert(data_json=data_json) # returning the queue_id for messages-local
|
|
75
75
|
self.logger.end("Entry pushed to the queue database successfully")
|
|
76
76
|
except Exception as e:
|
|
77
77
|
self.logger.exception("Error while pushing entry to the queue database", object=e)
|
|
78
78
|
raise
|
|
79
|
+
return queue_id
|
|
79
80
|
|
|
80
81
|
def push_back(self, queue_item: dict) -> None:
|
|
81
82
|
"""Push a taken queue item back to the queue."""
|
|
@@ -108,7 +109,7 @@ class DatabaseQueue(OurQueue, GenericCRUD):
|
|
|
108
109
|
# Update the selected queue item
|
|
109
110
|
query = f"UPDATE {self.default_table_name} " \
|
|
110
111
|
f"SET queue_status_id=%s, updated_user_id=%s, user_jwt=%s, thread_id=%s," \
|
|
111
|
-
f"server_ip_v4=%s, server_ip_v6=%s " \
|
|
112
|
+
f"server_ip_v4=%s, server_ip_v6=%s, updated_timestamp = NOW() " \
|
|
112
113
|
f"WHERE {self.id_column_name} = %s"
|
|
113
114
|
params = (StatusEnum.RETRIEVED.value, updated_user_id, self.user.get_user_JWT(),
|
|
114
115
|
get_thread_id(), ip_v4, ip_v6, queue_item[self.id_column_name])
|
|
@@ -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.35',
|
|
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
|
|
File without changes
|