Skip to main content

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"

readme42.com

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-commands-manager-2020.12.2.tar.gz (3.5 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page