tasq-client-python 0.1.14__tar.gz → 0.1.16__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.
- tasq-client-python-0.1.16/PKG-INFO +10 -0
- {tasq-client-python-0.1.14 → tasq-client-python-0.1.16}/setup.py +1 -1
- {tasq-client-python-0.1.14 → tasq-client-python-0.1.16}/tasq_client/client.py +11 -1
- tasq-client-python-0.1.16/tasq_client_python.egg-info/PKG-INFO +10 -0
- tasq-client-python-0.1.14/PKG-INFO +0 -3
- tasq-client-python-0.1.14/tasq_client_python.egg-info/PKG-INFO +0 -3
- {tasq-client-python-0.1.14 → tasq-client-python-0.1.16}/README.md +0 -0
- {tasq-client-python-0.1.14 → tasq-client-python-0.1.16}/setup.cfg +0 -0
- {tasq-client-python-0.1.14 → tasq-client-python-0.1.16}/tasq_client/__init__.py +0 -0
- {tasq-client-python-0.1.14 → tasq-client-python-0.1.16}/tasq_client/check_type.py +0 -0
- {tasq-client-python-0.1.14 → tasq-client-python-0.1.16}/tasq_client/check_type_test.py +0 -0
- {tasq-client-python-0.1.14 → tasq-client-python-0.1.16}/tasq_client_python.egg-info/SOURCES.txt +0 -0
- {tasq-client-python-0.1.14 → tasq-client-python-0.1.16}/tasq_client_python.egg-info/dependency_links.txt +0 -0
- {tasq-client-python-0.1.14 → tasq-client-python-0.1.16}/tasq_client_python.egg-info/requires.txt +0 -0
- {tasq-client-python-0.1.14 → tasq-client-python-0.1.16}/tasq_client_python.egg-info/top_level.txt +0 -0
|
@@ -35,6 +35,8 @@ class QueueCounts:
|
|
|
35
35
|
# server is old enough to not support rate estimation.
|
|
36
36
|
rate: Optional[float] = None
|
|
37
37
|
|
|
38
|
+
modtime: Optional[int] = None
|
|
39
|
+
|
|
38
40
|
|
|
39
41
|
class TasqClient:
|
|
40
42
|
"""
|
|
@@ -255,7 +257,7 @@ class TasqClient:
|
|
|
255
257
|
def counts(self, rate_window: int = 0) -> QueueCounts:
|
|
256
258
|
"""Get the number of tasks in each state within the queue."""
|
|
257
259
|
data = self._get(
|
|
258
|
-
f"/counts?window={rate_window}",
|
|
260
|
+
f"/counts?window={rate_window}&includeModtime=1",
|
|
259
261
|
{
|
|
260
262
|
"pending": int,
|
|
261
263
|
"running": int,
|
|
@@ -266,6 +268,14 @@ class TasqClient:
|
|
|
266
268
|
)
|
|
267
269
|
return QueueCounts(**data)
|
|
268
270
|
|
|
271
|
+
def clear(self):
|
|
272
|
+
"""Deletes the queue and all tasks in it."""
|
|
273
|
+
result = self._post_form("/task/clear", dict())
|
|
274
|
+
if result is True:
|
|
275
|
+
return True
|
|
276
|
+
else:
|
|
277
|
+
raise TasqMisbehavingServerError("failed to clear queue")
|
|
278
|
+
|
|
269
279
|
def __getstate__(
|
|
270
280
|
self,
|
|
271
281
|
):
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{tasq-client-python-0.1.14 → tasq-client-python-0.1.16}/tasq_client_python.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{tasq-client-python-0.1.14 → tasq-client-python-0.1.16}/tasq_client_python.egg-info/requires.txt
RENAMED
|
File without changes
|
{tasq-client-python-0.1.14 → tasq-client-python-0.1.16}/tasq_client_python.egg-info/top_level.txt
RENAMED
|
File without changes
|