Skip to main content

No project description provided

Project description

django-q-mt

Multi-threaded django-q2 worker.

Install

pip install django-q-mt

Usage

Add django_q_mt to INSTALLED_APPS.

./manage.py django_q_mt

Supports standard django-q2 configuration like Q_CLUSTER, workers, timeout.

Limitations

recycle isn't supported at the moment. If memory leaks are a concern, you can use MemoryMax= in systemd or an equivalent.

Timeouts

Timeout handling is more finicky and unreliable in multi-threaded setups. django-q-mt forces timeouts in the following stages:

  • A TimeoutError is injected with PyThreadState_SetAsyncExc. The thread must run the Python interpreter in order for this to work.

  • If the thread is still alive after 30 seconds, django-q-mt uses ptrace to force-stop a blocking syscall, eg. an infinite read from a socket.

  • If it fails, after 30 second the entire process with all threads is recycled. It should be a rare case, as at this point the timing out thread is either running a tight C loop or is deadlocked.

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_q_mt-0.5.tar.gz (6.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_q_mt-0.5-py3-none-any.whl (6.4 kB view details)

Uploaded Python 3

File details

Details for the file django_q_mt-0.5.tar.gz.

File metadata

  • Download URL: django_q_mt-0.5.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for django_q_mt-0.5.tar.gz
Algorithm Hash digest
SHA256 f2f10b9ebb2855f4adc43568c64285e6067fc8e85a180e71eacf3ee7394b04b2
MD5 3cfa0a6aab3295b016fe466545255667
BLAKE2b-256 1b6ca06c1f68d518637cdece2f80ca50490f30cba3e0b3e551867ac4556e1ef0

See more details on using hashes here.

Provenance

The following attestation bundles were made for django_q_mt-0.5.tar.gz:

Publisher: publish.yml on mbachry/django-q-mt

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file django_q_mt-0.5-py3-none-any.whl.

File metadata

  • Download URL: django_q_mt-0.5-py3-none-any.whl
  • Upload date:
  • Size: 6.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for django_q_mt-0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 74c32a9a6ea5ce755dabc5750320d7da4ac67ce345b329080927384787465d8d
MD5 8a7b09e8ef9523920faec917db92c34c
BLAKE2b-256 2ec320dbc0d412e78af6a8a2c8e165b2c00be4deb4ba06b4b017c8a1183e306f

See more details on using hashes here.

Provenance

The following attestation bundles were made for django_q_mt-0.5-py3-none-any.whl:

Publisher: publish.yml on mbachry/django-q-mt

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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