Txrdq

Latest version: v0.2.14

Safety actively analyzes 688619 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 2

0.2.8

----------------------------------

Use single quotes on strings in setup.py.

0.2.7

----------------------------------

Added LICENSE file, and Apache boilerplate to *.py files. Added useless
assignment in setup.py to keep pyflakes quiet.

0.2.6

----------------------------------

txrdq.rdq.ResizableDispatchQueue.underway was returning a set of job
arguments instead of a set of txrdq.job.Job instances. This has been
corrected.

txrdq.rdq.ResizableDispatchQueue.reprioritize was changing the priority in
the priority queue but not adjusting it in the job object. Fixed.

0.2

---------------------------------

This version is not backwards compatible with 0.1. Changed are:

- ResizableDispatchQueue.pending() now returns a list of txrdq.job.Job
instances (instead of a list of job arguments). This gives much more
detail on what's pending. If you want the old behavior, do this:

pending = [j.jobarg for j in rdq.pending()]

- Similarly, ResizableDispatchQueue.underway() also returns a list of Job
instances.

- When you call clearQueue(), pening job deferreds (returned by put())
will have cancel called on them. To prevent this, call clearQueue with
cancelPending=False.

New:

- put() returns a deferred. The deferred will fire with an instance of
txrdq.job.Job that will contain details of the completed job. If the
job encounters an error or if cancel is called on it, it will errback
with a Job instance.

- put() can now take an optional priority argument (default is zero). Low
priorities values are more important.

- A Job instance that is returned by pending() or underway() can be
cancelled.

- A Job instance that is returned by pending() or underway() can be
watched, via job.watch(). This provides a deferred that will fire in
the same way that the one returned by put() will.

- A Job instance can be reprioritized, via job.reprioritize(priority)

- When you call stop() it will normally wait until all underway jobs
complete. To instead cancel them immediately, pass cancelUnderway=True
to stop(). Underway jobs cancelled in this way, will be returned in the
list of jobs returned by stop().

- There is a standalone class DeferredPriorityQueue in txrdq/dpq.py that
might be of independent interest.

- There is a standalone class DeferredPool in txrdq/pool.py that might be
of independent interest.

- Lots of tests and docstrings added. More of both are needed. pydoc
txrdq.rdq will give you something reasonable.

Page 2 of 2

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.