Skip to main content

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.

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.10.tar.gz (6.2 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.10-py3-none-any.whl (6.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: django_q_mt-0.10.tar.gz
  • Upload date:
  • Size: 6.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for django_q_mt-0.10.tar.gz
Algorithm Hash digest
SHA256 de9d99f2865422e4d5ee545ca6f4a1bc3bce53a4d4fac56d10da4eb19bf89125
MD5 6b80e3933b9b2df72bfb154ed40c0c3e
BLAKE2b-256 a3a846344a54d2635f7899b61372d3bf93eacde83c83e8cd88beb154caa452c0

See more details on using hashes here.

Provenance

The following attestation bundles were made for django_q_mt-0.10.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.10-py3-none-any.whl.

File metadata

  • Download URL: django_q_mt-0.10-py3-none-any.whl
  • Upload date:
  • Size: 6.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for django_q_mt-0.10-py3-none-any.whl
Algorithm Hash digest
SHA256 750a95839cb374f5588708d5682592649f3589548445047a22a7b8902785a2f7
MD5 075665d0fdb1737f7501dfd66621c11e
BLAKE2b-256 f92c8f2ff2f0cfe43dfc4d4e563a38092634891f828550708f7238aa8e1d4a15

See more details on using hashes here.

Provenance

The following attestation bundles were made for django_q_mt-0.10-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.

Release history Release notifications | RSS feed

This release

0.10 This release

2 files

0.9

2 files

0.8

2 files

0.7

2 files

0.6

2 files

0.5

2 files

0.4

2 files

0.3

2 files

0.2

2 files

0.1

2 files

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