Releases: Koed00/django-q
v0.7.4
- adds a MongoDB broker
- adds Django 1.9 compatibility
Notes:
Django 1.9 is very strict with model imports in the app root.
So when you are using Django 1.9 you will have to import from the relevant submodules.
i.e. from django_q import async
becomes from django_q.tasks import async
.
This has also been changed in the Docs and will be the standard moving forward, but the root imports remain available for Django 1.7 and 1.8.
v0.7.3
- adds
wait
parameter toresult
andfetch
methods which will make them wait n milliseconds for a result to appear.
from django_q import async, result, fetch
# queue a task
task_id = async('math.copysign', 1, -1)
# wait 200 milliseconds for a result
result = result(task_id, 200)
# or wait 500 milliseconds for a result object
task = fetch(task_id, 500)
- adds support for
lock_size
to the broker class which counts the number of tasks currently locked for acknowledgement. - brokers that support a lock/reservation count will show this in the monitor.
Queued 1988(24)
with the bracketed number being the amount of tasks awaiting acknowledgment. - adds lock size to the SQS broker. Note that due to the nature of SQS, this is not atomic but rather an approximation.
v0.7.2
v0.7.1
- adds
python management.py qinfo --config
to print the current configuration - the Queue admin view for the orm broker now shows name, function and task id columns
- adds group functions to task instances:
task.group_count()
task.group_result()
task.group_delete()
- some other minor enhancements
v0.7.0
- Adds Django ORM broker
You can now use the Django database backend as a persistent, at-least-once broker.
Important: If you are upgrading and want to use the ORM broker, please run python manage.py migrate
to add the queue table to the database.
- Adds
scheduler
option.
If you want to disable the scheduler to save overhead or to pause scheduling, you can do this by settings this option to False
. Defaults to True
.
v0.6.4
Adds Amazon SQS broker using Boto3
# example SQS broker connection
Q_CLUSTER = {
'name': 'SQSExample',
'workers': 4,
'timeout': 60,
'retry': 90,
'queue_limit': 100,
'bulk': 5,
'sqs': {
'aws_region': 'us-east-1',
'aws_access_key_id': 'ac-Idr.....YwflZBaaxI',
'aws_secret_access_key': '500f7b....b0f302e9'
}
}