Releases: Koed00/django-q
Releases · Koed00/django-q
v0.7.14
v0.7.13
v0.7.12
v0.7.11
- adds an
Async
class wrapper for theasync
function - the
wait
keyword now can take the value-1
which will make the functions wait indefinitely for a result. - fixes a bug with cached group key not timing out
- fixes a bug where a task with a group only has a group results
- much faster option iteration for
async
- references to
q_options
objects now retain their value after a run
The Async class wraps the async function, to make it easier to work with:
# Async class instance example
from django_q.tasks import Async
# instantiate an async task
a = Async('math.floor', 1.5, group='math')
# you can set or change keywords afterwards
a.cached = True
# run it
a.run()
# wait indefinitely for the result and print it
print(a.result(wait=-1))
# change the args
a.args = (2.5,)
# run it again
a.run()
# wait max 10 seconds for the result and print it
print(a.result(wait=10))
1
2
v0.7.10
v0.7.9
v0.7.8
- Adds a global and per-task cached option, which will redirect any results to the much faster cache backend where it is accessible for all the result functions without touching the database.
- Adds a
count
option for groups results which will block until the indicated amount of results in the group has been reached - Adds a
wait
option in miliseconds for group results. Can be used in conjunction withcount
- Adds async_iter(func, args_iter, **kwargs) command which takes an iterable set of arguments, asyncs them individually against the cache backend and collates them back into a single database result.