Skip to main content

Requirements

Upgrade from v0.3 to v0.4

As of v0.4, djcall uses a PostgreSQL JSON field instead of a Picklefield for Caller.kwargs, which means that unless you have only JSON serializable contents in your djcall_caller.kwargs columns: the migration will fail, so will it if you don’t run PostgreSQL. Sorry, but it became too much of an annoyance not to be able to query of Call kwargs. Anyway, a migration should take care of this for you. It leaves the old Picklefield renamed from kwargs to old_kwargs until next release where it will be dropped.

Install

pip install djcall

Add djcall to INSTALLED_APPS and migrate.

Usage

from djcall.models import Caller

Caller(
    # path to python callback
    callback='djblockchain.tezos.transaction_watch',
    # JSON serializable kwargs
    kwargs=dict(
        pk=transaction.pk,
    ),
).spool('blockchain')  # optionnal spooler name

No decorator, no nothing,

If you have CRUDLFA+ or django.contrib.admin, you should see the jobs there, and be able to cancel them.

Example project

Setup example project:

djcall-example collectstatic
djcall-example migrate
djcall-example createsuperuser

Run with runserver:

djcall-example runserver

Or with uWSGI:

uwsgi --env DJANGO_SETTINGS_MODULE=djcall_example.settings --env DEBUG=1 --spooler=/spooler/blockchain --spooler=/spooler/mail --spooler-processes 1 --http=:8000 --plugin=python --module=djcall_example.wsgi:application --honour-stdin --static-map /static=static

History

First made a dead simple pure python generic spooler for uwsgi: https://gist.github.com/jpic/d28333b0573c3c555fbe6e55862ecddb

The made a first implementation including CRUDLFA+ support: https://github.com/yourlabs/django-uwsgi-spooler

This version adds:

  • Cron model and support for uWSGI cron, can’t add/remove them without restart, but can change kwargs and options online

  • CRUDLA+ support is on hold waiting for what’s currently in https://github.com/tbinetruy/CHIP because i don’t want to build crud support here with templates because of the debt this will add, it’s time to use components in CRUDLFA+ to make the CRUD for Cron/Background tasks awesome

Metadata

Release files for djcall 0.4.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for djcall 0.4.2
File Size Uploaded Provenance Actions
djcall-0.4.2.tar.gz 14.5 kB Without provenance Details for djcall-0.4.2.tar.gz

Release files / djcall-0.4.2.tar.gz

Download URL djcall-0.4.2.tar.gz
Size 14.5 kB
Tags Source
SHA-256 checksum
How to use checksums
3ca0cc9f191b11af9fd9e0181f78e91c1bd4b24fe1d5f9586531d2a07454af5f
BLAKE2b-256 checksum
How to use checksums
eb044f3588e7d5cad29af4c2b4ede26268f314326ae9b7a63a09afe2407e4ece
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.2

Security for djcall 0.4.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page