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

Uploaded Python 3

File details

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

File metadata

  • Download URL: django_q_mt-0.8.tar.gz
  • Upload date:
  • Size: 6.1 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.8.tar.gz
Algorithm Hash digest
SHA256 3634c3ca3b12c6bfa1b34295b9bc1134289cfc374a29aeb9ec5f9d3bc9ea7525
MD5 a1daa47190cdfeb79784d94ef6da69db
BLAKE2b-256 73384abe2747419da0d7d1a6d5582cbe99c2fdf380791e20e7f5911764dc951a

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: django_q_mt-0.8-py3-none-any.whl
  • Upload date:
  • Size: 6.5 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.8-py3-none-any.whl
Algorithm Hash digest
SHA256 de110fa5b87d6dee8d311dea7ca95f37b48e0d01c3fe96e635df282841ef4730
MD5 763d587030ac9db9b3572f9a5e2f0a7b
BLAKE2b-256 f3aba20f57eeb6b0d220f1386e23c7e8292c2545116d298eed07868d950e94a0

See more details on using hashes here.

Provenance

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