mirror of
https://github.com/django-q2/django-q2.git
synced 2026-09-25 19:38:12 +08:00
docs: updated management command example
This commit is contained in:
@@ -227,6 +227,22 @@ In Python 3.5 the subprocess module has changed quite a bit and returns a :class
|
||||
|
||||
Instead of :func:`async` you can of course also use :func:`schedule` to schedule commands.
|
||||
|
||||
For regular Django management commands, it is easier to call them directly:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
from django_q.tasks import async, schedule
|
||||
|
||||
async('django.core.management.call_command','clearsessions')
|
||||
|
||||
# or clear those sessions every hour
|
||||
|
||||
schedule('django.core.management.call_command',
|
||||
'clearsessions',
|
||||
schedule_type='H')
|
||||
|
||||
|
||||
|
||||
Groups
|
||||
======
|
||||
A group example with Kernel density estimation for probability density functions using the Parzen-window technique.
|
||||
|
||||
Reference in New Issue
Block a user