Django commands manager
Project description
Installation
$ [sudo] pip install django-commands-manager
settings.py
INSTALLED_APPS+=['django_commands_manager']
migrate
$ python manage.py migrate
Examples
Queue
from django_postgres_refresh_matviews.models import Matview
from django_postgres_refresh_matviews.utils import refresh_matviews_queue
Matview.objects.get_or_create(schemaname='public',matviewname='matview1')
Matview.objects.get_or_create(schemaname='public',matviewname='matview2')
refresh_matviews()
Matview.objects.filter(schemaname='public').update(is_completed=False)
Log
from django_commands_manager.models import Log
for l in Log.objects.filter(schemaname='public',matviewname='matview1'):
l.started_at, l.completed_at
Exc
from django_commands_manager.models import Exc
for l in Log.objects.filter(schemaname='public',matviewname='matview1'):
l.started_at, l.completed_at
cli
$ python manage.py run_commands "group1"
$ python manage.py run_commands "group2"
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Close
Hashes for django-commands-manager-2020.12.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | b24e360f459b215e1de1f097feb5acc173b5b98bb2916964fb838e0c9d37ce4d |
|
MD5 | d91280cf56c5d6ca76e0e5dedba825cd |
|
BLAKE2b-256 | 655f9bf9b067d8f9cbb537dd93deed20a7c11054c808306c8eef3bb50ab6a15a |